Unsurpress multiple files

Is there any way to unsurpress multilpe features in multiple different files at one time. Similar to a batch? I have a process where imported files are all surpressed and need to unsurpress

Thanks in advance JIM

Reply to
Jim Johns (News)
Loading thread data ...

API is the only way I can think of.

Reply to
Mr. Who

Found this bit of code lying around. I don't recall if I wrote it or found it here through google groups. Anyway most of it is taken directly out of the API Help. It should do what you are looking for.

Dim swApp As SldWorks.SldWorks Dim Assy As SldWorks.ModelDoc2 Dim Config As SldWorks.Configuration

Sub main() Dim rootComp As Component2

Set swApp = Application.SldWorks Set Assy = swApp.ActiveDoc Set FeatMan = Assy.FeatureManager Set Config = Assy.GetActiveConfiguration Set rootComp = Config.GetRootComponent

RecurseAssy rootComp, 0

End Sub

Sub RecurseAssy _ ( _ swComp As SldWorks.Component2, _ nLevel As Long _ )

Dim vChildComp As Variant

Dim swChildComp As SldWorks.Component2

Dim swCompConfig As SldWorks.Configuration

Dim sPadStr As String

Dim i As Long

Dim SplitStr As Variant

Dim NewComp As Boolean

For i = 0 To nLevel - 1

sPadStr = sPadStr + " "

Next i

vChildComp = swComp.GetChildren

For i = 0 To UBound(vChildComp)

Set swChildComp = vChildComp(i) Debug.Print swChildComp.Name2 superr = swChildComp.SetSuppression2(swComponentResolved) Select Case superr Case swSuppressionError_e.swSuppressionBadComponent Debug.Print "swSuppressionBadComponent" Case swSuppressionError_e.swSuppressionBadState Debug.Print "swSuppressionBadState" Case swSuppressionError_e.swSuppressionChangeFailed Debug.Print "swSuppressionChangeFailed" Case swSuppressionError_e.swSuppressionChangeOk 'Debug.Print "swSuppressionChangeOk" End Select

RecurseAssy swChildComp, nLevel + 1 Next i

End Sub

Reply to
CS

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.