How to handle tags in the saved view point with autodesk Navisworks API?

363 Views Asked by At

Is there any Navisworks API to handle tags? For example, Simply gets some kind of TAG Object or add tags, iterate tags, move to tagged views, etc..

It seems like Saved View Point has comments and tags conceptually. But, while you can add comments to savedviewpoint with AddComment method, in case of tags, there is no such kind of method or property in the saved view point class. Even in the entire document of Navisworks API documents, I can't find about tag things. I found that ViewControl class has Tag property. But, I think it is not about tags of saved view point.

Any help would be appreciated greatly, thanks.

2

There are 2 best solutions below

0
Chan Baek On BEST ANSWER
0
Chan Baek On

In the navisworks, tag is a kind of redlines. You can get an xml file by exporting saved view points. In the xml file, you can find information of tags in tag.

If you want to get redlines using api. You can use GetRedlines() method.

Code likes this:

        Document document = NavisApp.ActiveDocument;

        foreach (SavedViewpoint svp in document.SavedViewpoints.ToSavedItemCollection())
        {
            document.SavedViewpoints.CurrentSavedViewpoint = svp;
            Autodesk.Navisworks.Api.View currentView = NavisApp.ActiveDocument.ActiveView;
            string redLines = currentView.GetRedlines(); 
        }

But this method doesn't returns about tags. I don't know the reason.