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: 

Simulate 2012 .NET API - Can I append a file and exclude references?

4 REPLIES 4
Reply
Message 1 of 5
x2dalyon
570 Views, 4 Replies

Simulate 2012 .NET API - Can I append a file and exclude references?

It seems that many of the DWG files I am appending into a composite model reference each other.  I would like to ignore the X-REFs when appending the file.  Is there a way to do that?

4 REPLIES 4
Message 2 of 5
x2dalyon
in reply to: x2dalyon

If I can not exclude them on the append, can I remove the layers from the external references once appended?  I created a search like this:

 

items = Autodesk.Navisworks.Api.

Application.ActiveDocument.Models.GetRootItems().DescendantsAndSelf.Where(x => x.IsLayer && (x.DisplayName.Contains("|")));

 

I am unsure of the .NET or COM syntax to remove the layers and their contents from this point.

Message 3 of 5
KempCE
in reply to: x2dalyon

Has any thought been given to creating a pre process script that will remove all x-refs from the dwg? 

I am quite sure you can remove all Xref's thru an AutoLisp routine.  You could even compose\download a utility that would Generate The Script Then execute script.

 

Colin

 

Message 4 of 5
x2dalyon
in reply to: KempCE

Thank you for the sugestion. I think it woud be more effecient to be able to set the File Reader option that you find in global options which allows you to turn off X-REFS.  Or importing a Global Options file that has that option specified.  I have not been able to find how to do either of these in the COM help or the API help.

Message 5 of 5
deanlyon
in reply to: x2dalyon

The only way I know of to do this is to manually set the Global Options.  In Options go to File Readers, then DWG/DXF then Uncheck Convert XRefs.  If someone has a suggestion as to how to do this with the API. I am eager to hear it as well.

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

Post to forums  

Rail Community


Autodesk Design & Make Report