Hello, i would like to create macro, which insert new geometrical.set into one selected. I found some examples on internet, and i have created something like this:
Language="VBSCRIPT"
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set hybridBodies1 = part1.HybridBodies
Set hybridBody2 = hybridBodies1.Add()
hybridBody2.Name = "NEW GEOMETRICAL SET"
part1.InWorkObject = hybridbody2
part1.Update
End Sub
But it inserts geometrical.set into root directory, what should i add to insert geometrical.set into selected geometrical.set.
Is there any posibility to apply hotkey to created macro ?
Language="VBSCRIPT"
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set hybridBodies1 = part1.HybridBodies
Set hybridBody2 = hybridBodies1.Add()
hybridBody2.Name = "NEW GEOMETRICAL SET"
part1.InWorkObject = hybridbody2
part1.Update
End Sub
But it inserts geometrical.set into root directory, what should i add to insert geometrical.set into selected geometrical.set.
Is there any posibility to apply hotkey to created macro ?