×
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

"EditUnsuppressDependent" does not work in API macro

"EditUnsuppressDependent" does not work in API macro

"EditUnsuppressDependent" does not work in API macro

(OP)
Hi, all API masters:

I recorded the following macro to use "Unsuppress with Dependents" to unsuppress all components in an active assembly.  But when I tried to run it, it did not work.  It appears that the problem is due to "Part.EditUnsuppressDependent" statement.

Do you guys have the same experience?  Do you have any workaround?  I want to do one-click to unsuppress all components in an active assembly.

Thanks,

Alex
SW 2006 sp3.4
Win XP 2.0sp

' ******************************************************************************
' C:\DOCUME~1\achen\LOCALS~1\Temp\swx1548\Macro1.swb - macro recorded on 05/11/06 by ACHEN
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("A-00000620.SLDASM", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
Part.EditUnsuppressDependent
Part.ClearSelection2 True
End Sub

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