Select a view with ilogic view

Select a view with ilogic view

Anonymous
Not applicable
2,319 Views
5 Replies
Message 1 of 6

Select a view with ilogic view

Anonymous
Not applicable

Hi All,

 

Can anyone tell me how can I select a view in an idw file, please?.

 

I refer to do visible that selection,the same when I select a view in a drawing and it appears framed in a red lines as I show you in the screenshot.Selected view.jpg

Can you help me, please?.

Thanks.

0 Likes
Accepted solutions (2)
2,320 Views
5 Replies
Replies (5)
Message 2 of 6

Sergio.D.Suárez
Mentor
Mentor
Accepted solution
Dim doc As DrawingDocument = ThisDoc.Document
Dim oSheet As Sheet = doc.ActiveSheet
Dim oView As DrawingView = oSheet.DrawingViews.Item(1)'Select View for Item number

ThisApplication.CommandManager.DoSelect(oView)'Select View

Hi, this code will select an identified view through the item in the active drawing file sheet.
I hope I can help you with your problem. regards 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Message 3 of 6

Anonymous
Not applicable

Muchas gracias, Sergio, Smiley Happy

Thank you very much.

0 Likes
Message 4 of 6

RoyWickrama_RWEI
Advisor
Advisor

Hi Sergio.

Thanks. I like it: useful in my iLogic pursuits.

could I have know the code for picking a view (with a pick enum filter)? Useful, in case there ate multiple views.

Thanks.

 

0 Likes
Message 5 of 6

Sergio.D.Suárez
Mentor
Mentor
Accepted solution

Hi @RoyWickrama_RWEI , try these ilogic codes, either one, these fragments I use it a lot, I hope they can be useful, regards

 

Dim oView As DrawingView

oView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select View")

 Or

Dim oView As DrawingView

oView = ThisApplication.CommandManager.Pick(16898, "Select View")

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Message 6 of 6

Matthew_Policelli
Advocate
Advocate

Is there a way to select multiple views using this (while holding ctrl, for example)?

0 Likes