|
![]() |
Returns the COM API state corresponding to
Application.MainDocument
in the .Net API
Namespace: Autodesk.Navisworks.Api.ComApi
Assembly: Autodesk.Navisworks.ComApi (in Autodesk.Navisworks.ComApi.dll)
Syntax
Visual Basic |
---|
Public Shared ReadOnly Property State As InwOpState10 Get |
C# |
---|
public static InwOpState10 State { get; } |
Visual C++ |
---|
public: static property InwOpState10^ State { InwOpState10^ get (); } |
Examples

ComApi.InwOpState10 state; state = ComApiBridge.ComApiBridge.State; foreach (ComApi.InwOaPath path in state.CurrentSelection.Paths()) { ComApi.InwOaNode node; node = path.Nodes().Last() as ComApi.InwOaNode; MessageBox.Show(Autodesk.Navisworks.Api.Application.Gui.MainWindow, "UserName=" + node.UserName); }
Exceptions
Exception | Condition |
---|---|
System..::..InvalidOperationException | Application::MainDocument is Null, COM API is not available |