Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia Macro

Status
Not open for further replies.

vvk555

Automotive
Joined
Feb 24, 2017
Messages
1
Location
US
Do anyone know how to create a macro to activate/deactivate a particular constraint in assembly? I tried to record the macro but it is not working.
 
Code:
Sub CATMain()

Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument

Dim product1 As Product
Set product1 = productDocument1.Product

Dim constraints1 As Constraints
Set constraints1 = product1.Connections("CATIAConstraints")

Dim constraint1 As Constraint
Set constraint1 = constraints1.Item("Offset.1")

'---activate or deactivate---
constraint1.Deactivate
'constraint1.Activate

End Sub

Drew Mumaw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top