• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Navisworks API

    Reply
    ADN Support Specialist
    xiaodong.liang
    Posts: 814
    Registered: ‎06-12-2011

    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

    Please use plain text.
    Contributor
    ssdiesel
    Posts: 18
    Registered: ‎02-07-2012

    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?

    Please use plain text.
    ADN Support Specialist
    xiaodong.liang
    Posts: 814
    Registered: ‎06-12-2011

    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

    Please use plain text.
    Contributor
    ssdiesel
    Posts: 18
    Registered: ‎02-07-2012

    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

     

    Please use plain text.
    ADN Support Specialist
    xiaodong.liang
    Posts: 814
    Registered: ‎06-12-2011

    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

    Please use plain text.
    Contributor
    ssdiesel
    Posts: 18
    Registered: ‎02-07-2012

    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!

     

    Please use plain text.
    ADN Support Specialist
    xiaodong.liang
    Posts: 814
    Registered: ‎06-12-2011

    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

    Please use plain text.