Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Mar 17, 2015
46
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
 
Replies continue below

Recommended for you

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