Autodesk Navisworks API
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Project units
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello!
I want to merge my dxf file with navis drawing:
Autodesk.Navisworks.Api.Document doc = Autodesk.Navisworks.Api.Application.ActiveDocument; if (doc.TryMergeFile(@"C:\test1.dxf")) { MessageBox.Show("Merge successful."); }
But when i merge this files.I open Tree Structure. Navis project has units "Inches", but test1.dxf has milimetres.
How can i set inches?
Thanks
Solved! Go to Solution.
Re: Project units
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
Using the .NET API, we can get the value of the Units for a document using the Document.Units() property. But it returns the units of the first model only. And setting the value is not possible since this property is read-only.
Using the COM API does not either help since the part.LinearUnits (where part is InwOaPartition2) is read-only and does not allow us to set the units.
We have had wish to provide the API to set units.
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Project units
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Project units
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
The external reference of Navisworks plugin must be put within <Navisworks installation path>\Dependencies\.
I am interested in how you set the unit
Did you get the handle of the dialog and swtich to the control of the Unit, and mimic changing unit? Is it possible to share some hints? Thank you!
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Project units
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
thanks for answer.
well for set units i used some scripts and windows handler. i think its wrong. but...
first of all i get screen size,then automaticaly press "structure view" button, this button i check by coordinates,
after i try to find this window, then press other button etc
well i know that awful desition, but it works.
Best Regards,
Sergey
