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 MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA VBA & DRAWINGS / get the view of a selected object in drawing 1

Status
Not open for further replies.

jissididi

Automotive
Joined
Mar 17, 2015
Messages
46
Location
FR
Hello All,

If I make a selection of all the texts in a drawing, where can I find the views in which ones every text are located ?

something like

Code:
dim myselection as selection
set myselection = CATIA.activedocument.Selection 'with for exemple 2 texts selected in a drawingview
msgbox myselection.item(1).parent.name 'parent being the view in which one the first item selected is located

Thanks
 
To get actual selected object use Value property.
Also note that class structure goes like this: DrawingView - DrawingTexts - DrawingText

Code:
MsgBox myselection.Item(1).Value.Parent.Parent.Name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top