cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

Macro transforming groups into hotspots

MariaMartinsson
1-Newbie

Macro transforming groups into hotspots

Hi everyone I want to create a macro that selects all groups in an illustration and transform them into hotspots. Do someone have a code or a sample of code that does something like this that I could use as copy paste? Where can I get further information on the macro language? Best regards Maria
2 REPLIES 2

The code below will go through your entire document and figure out what is and what is not a group. You can add your code to hotspot within. In regards to finding more info, check the Help menu in IsoDraw. It's not the friendliest, but it covers most everything needed. Macro Step_Through_Groups Define el as Element #Clears selection. Select All #Sets focus to first selected element. el = ActiveDoc.FirstSelectedElement #Loops through all selected objects. While (Exists(el) = True) #Checks if current selection is a group. If (el.Type = "Group") Then Message "This is a group, so do something!" Else Message "This is not a group." End If #Advances to next element. el = el.NextSelectedElement End While End Macro

Thank you for the answer. I´ll try it out.