×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

To know if the Plane is used in assembly or not

To know if the Plane is used in assembly or not

To know if the Plane is used in assembly or not

(OP)
Hi,

I have a part that is been used in several assemblies. This part has a Reference Plane with not children (Meaning nothing lists as childeren in the parent/child box).

As I mentioned that this part was used in several assemblies, is there a way to know if this plane was ever used in any assemblies for mates or incontext features for other parts?

Thanks
BT

RE: To know if the Plane is used in assembly or not

I don't believe there is a direct way to check.

A simple method is to suppress the plane in the part, and then open all the assys the part is used in. If no errors appear you are probably safe to delete the plane. As always make back-ups first.

RE: To know if the Plane is used in assembly or not

Deepak,
You read my mind. I found that macro same time as you.
thumbsup2

Chris
SolidWorks 09 SP4.1
ctopher's home
SolidWorks Legion

RE: To know if the Plane is used in assembly or not

2thumbsupwiggle      

Deepak Gupta
SW2009 SP3.0
SW2007 SP5.0
MathCAD 14.0

RE: To know if the Plane is used in assembly or not

(OP)
I will try modifying this macro & put it to use. Thanks for your support.

RE: To know if the Plane is used in assembly or not

Do share the outcome.

Thanks

Deepak Gupta
SW2009 SP3.0
SW2007 SP5.0
MathCAD 14.0

RE: To know if the Plane is used in assembly or not

(OP)
Deepak,
Sorry to ask this simple question. You adviced me to modify this macro to work in a assembly. I edited the macro and modified it to Assly.

1. Should I run this in the assly?
2. Can I run it in the part also?

My main intension is to determine, if I can safely delete few planes if they arent needed by any other assemblies.

Modified code : (Poor editing, used kind of replace word)

Dim swApp As Object
Dim Assly As Object
Dim SelMgr As Object
Sub deleteplanes()
Dim SubFeatObj As Object
Dim FeatObj As Object
Dim FeatType As String
Dim retval As Variant

    Set FeatObj = Part.FirstFeature
    Do While Not FeatObj Is Nothing
        FeatType = FeatObj.GetTypeName
        If FeatType = "RefPlane" And FeatObj.Name <> "Front" _
        And FeatObj.Name <> "Top" And FeatObj.Name <> "Right" _
        Then 'a sketch - select it
            retval = FeatObj.GetChildren()
            If IsEmpty(retval) Then
                    Part.AndSelectByID FeatObj.Name, "PLANE", 0, 0, 0
            End If
        End If
        Set FeatObj = FeatObj.GetNextFeature
    Loop
    
Part.DeleteSelection (False)

End Sub
Sub main()
    
    Set swApp = CreateObject("SldWorks.Application")
    Set Assly = swApp.ActiveDoc
    If (Assly Is Nothing) Then
        swApp.SendMsgToUser2 _
        "No Active Assly !! " _
        , swMbWarning, swMbOk
        Exit Sub
    End If
    If (Assly.GetType <> 1) Then   ' If not an assembly or parts, then exit
        swApp.SendMsgToUser2 "Only for use with parts.", swMbWarning, swMbOk
        Exit Sub
    End If
    Set SelMgr = Part.SelectionManager()  ' Get the selection manager object
    Assly.ClearSelection
    Call deleteplanes
End Sub

 

RE: To know if the Plane is used in assembly or not

BT,

You should be able to suppress them safely without worrying. If they are needed later you can bring them back if you see a Mate is missing a reference it will be called out.

otherwise a Suppressed feature is just like a deleted one because it isn't considered as being there when the part or assembly is rebuilt. It's always best to use the Default Reference Planes for mates in an assembly because they do not require a part rebuild to be solved like created datums or faces do.

If you designed a part of the default planes different then how you plan to mate it you can have one config with the part as built to use for drawings and another for Assembly where you can use Move Body to position it as you'd like to mate it in an assembly using the default planes.

Michael

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources