Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Get Drafting view of a selected Line object

Hello All,

 

I have selected one line of a drafting view, how to get the view in which the line exists?

it shows in information window, but I am not getting any suitable API for it.

 

Note that- it's not a sketch line, it's a line generated from modelling to drafting.

 

please find the attachment to get clarification.

 

please help.

Regards,

Abhi

2 REPLIES

Re: Get Drafting view of a selected Line object

[ Edited ]

I've not tested it, but the .AskViewDependentStatus method may come in handy here.

 

See this code from GTAC:

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api4937

The function doesn't do exactly what you are asking for, but it shows how to call the .AskViewDependentStatus method along with a few other methods that you might find useful.

Solution
Solution
Accepted by topic author Abhi_Learner
‎03-30-2017 11:17 PM

Re: Get Drafting view of a selected Line object

Hi @cowski1

 

Thanks for your reply.

I have got another solution which is pretty useful.

 

Now I am calling all objects of view using Myview.AskVisibleObjects().

Then by comparing the journalidentifier I get to know if the line belongs to the view.

 

Hope this is one of the solution.

 

Regards,

Abhi