Navisworks API

Reply
ADN Support Specialist
xiaodong.liang
Posts: 1,260
Registered: ‎06-12-2011
Message 11 of 17 (99 Views)

Re: Get all selected viewpoint

08-22-2012 07:35 PM in reply to: ssdiesel

unit affects this. API shows the value in document unit, while product uses meter. You can see a small 'm' atfer the values in the dialog viewpoint>edit>position.



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Contributor
ssdiesel
Posts: 20
Registered: ‎02-07-2012
Message 12 of 17 (96 Views)

Re: Get all selected viewpoint

08-22-2012 07:38 PM in reply to: xiaodong.liang

ok.. but how can i translate units coordinates in meters?

ADN Support Specialist
xiaodong.liang
Posts: 1,260
Registered: ‎06-12-2011
Message 13 of 17 (93 Views)

Re: Get all selected viewpoint

08-22-2012 07:44 PM in reply to: ssdiesel

I do not think it will be difficult for you to convert the values in different units, though Navisworks API does not provide the conversion.

 

btw, the document unit is told by Document.Units



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Contributor
ssdiesel
Posts: 20
Registered: ‎02-07-2012
Message 14 of 17 (91 Views)

Re: Get all selected viewpoint

08-22-2012 08:00 PM in reply to: xiaodong.liang

actually i dont get it how can i transform sv.Viewpoint.Position.X = 2028,...

into meters with Document.Units - enum class

 

ADN Support Specialist
xiaodong.liang
Posts: 1,260
Registered: ‎06-12-2011
Message 15 of 17 (89 Views)

Re: Get all selected viewpoint

08-22-2012 08:17 PM in reply to: ssdiesel

no Navisworks API, but this is a math question. e.g.

 

if the document unit is foot. while 1 foot = 0.3048 meter. thus the value in meter is : value * 0.3048

 

does this make sense?



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Contributor
ssdiesel
Posts: 20
Registered: ‎02-07-2012
Message 16 of 17 (85 Views)

Re: Get all selected viewpoint

08-22-2012 08:23 PM in reply to: xiaodong.liang

Now i get it, what you want to tell me..

with Document.Units we get default doc units and after that we translate it!

 

Thx for help!

 

ADN Support Specialist
xiaodong.liang
Posts: 1,260
Registered: ‎06-12-2011
Message 17 of 17 (71 Views)

Re: Get all selected viewpoint

08-28-2012 01:19 AM in reply to: ssdiesel

exactly! glad my comment could help :smileyhappy:



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community