Eng-Tips is the largest forum for Engineering Professionals on the Internet.

Members share and learn making Eng-Tips Forums the best source of engineering information on the Internet!

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

Activate Main Top Node product in assembly

Status
Not open for further replies.

NaWin55

Mechanical
Joined
Mar 21, 2020
Messages
98
Location
IN
Hello all

i am trying to create a macro to activate top main product of a assembly

i tried Product.Activate didnt work
catia.startcommand "frmActivate"
didnt work
is there any way

when i run the macro the mainproduc1 should be in Blue color means that is the active editing product in tree
refer image
image_q1oomi.jpg
 
you need to select the node first, and then use the StartCommand.


Code:
Sub CATMain()
Dim myDoc
Set myDoc = CATIA.ActiveDocument
Dim Selection1 As Selection
Set Selection1 = myDoc.Selection

Selection1.Add myDoc.Product
CATIA.StartCommand "FrmActivate"
End Sub

regards,
LWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top