Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pick Pixel again

6 REPLIES 6
Reply
Message 1 of 7
kennethmjones
656 Views, 6 Replies

Pick Pixel again

Hello,

 

I asked about this befor but did not get any replies. I am re-posting it with changes. The thing is... I have used the PickPixel function when using the ActiveX control in a VB form application but I can't seem to get it with the newer .Net Control thingy.

 

With the ActiveX control I got it through the NavisworksIntegratedAPI9.AxnwControlMDI object which is usualy the contol on the form.

 

I can't seem to get access to it through the .NET Control API. Can someone please advise how to do this with the new APIs.

 

Many thanks

 

Ken

6 REPLIES 6
Message 2 of 7

Hi Ken,

 

.NET API has not exposed the related API, and I do not think PickPixel is applicable to the .NET control, even you may think of COM interop, becasue the method is alive with the COM control.Sorry if this is a bad news for you.


 

Best regards,

 
autodesk_logo_signature.png

Xiaodong Liang

Developer Consultant

Autodesk Developer Technical Services

Message 3 of 7

Thank you for the reply.

 

Yes it is actually very bad news. It is a very useful function to get a 3D point that indicates what the user was clicking on. I can use that information for all kinds of useful things. Such as moving the camera position to a specific place in the model that a user can pick. Much better that trying to walk there or trying to guess what the coordinate might be...

 

Do you have any suggestions as to what procedure I could use to achive the same thing? 

 

Thanks,

 

 

Message 4 of 7

Ken,

 

My suggestion is to use the Look At coordinations of the Navisworks Camera. When you fly throught a model, Navisworks shows both Camera Position and Look At coorinations in the Viewpoint toolbar. If you use the Focus function, the Look At gives the coordinations of the selected point. In API, the InwNvCamera class does not give the Look At coordinations directly however it allows you to focus on a specific point using PointAt method. To get the Look At coordinations, you need to add the camera position (Position property from InwNvCamera) to the multiplication of the view direction unit vector (GetViewDir method from InwNvCamera ) by the focal distance (FocalDistance property from the InwNvViewPoint).

 

I hope this helps.

 

Hussam

Message 5 of 7

Hi Hussam,

 

Thank you for that very useful advice. I will make good use of this information.

 

however, I still think it would be useful to have a function like PickPixel to get pick points on model data. I can use the measure tools in some cases but it is a bit limiting.

 

What does anyone else think about this?

 

Many thanks,

 

Ken

Message 6 of 7

Good Day,

I'm just starting with the Navisworks API, and from what I've read and found so far, PickPixel seems to be the (only?) way to prompt the user to pick/select an element from the screen.

Please correct me if I'm wrong.

Anyway,  I can't get PickPixel working in a VB.Net plugin.

So, it would be great if PickPixel or something similar would be available in the .NET API.

Many Thanks,

Wolfgang

 

Message 7 of 7

Hi,

 

It is true for the current releases. And please note: Pick Pixe is only applicable with ActiveX control.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report