Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: Sergio.D.Suárez

Hi Sergio,

I have tried the code, Now the error message box is not coming but Angle constraints are not get creating.
The object collection function codes are fine (I have tried that code separately), I thing " CreateGeometryProxy(oAxis2, oproxyAxis2)" function is not working for "comp".

 

Previously I have used below function to select the components by using Pick command and the Angle constraint function worked fine

 

comps = ThisApplication.TransientObjects.CreateObjectCollection
While True

compOcc = ThisApplication.CommandManager.Pick(
SelectionFilterEnum.kAssemblyOccurrenceFilter,
"Select a component")
' If nothing gets selected then we're done
If IsNothing(compOcc) Then Exit While
comps.Add(compOcc)
End While

 

But Angle constraint function not working for below "comp" function

 

Dim comps As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection

For Each comp As ComponentOccurrence In oAsm.ComponentDefinition.Occurrences
oFilename = comp.Definition.Document.displayname
If InStr(oFilename, "VLV_MAN") "Create<> 0 Or InStr(oFilename, "VLV_HYD") <> 0 Then
comps.Add(comp)
End If
Next

 

Please give me your suggestion for this

 

Thanks & Regards,

Manoj Sampath