I am trying to program navisworks and dont know how to start. Can anyone help me with a code to select elements e.g a door in navisworks and how to change the door color.
Hi there,
I don't know what Navis works is, and I'm also a n00b, but maybe this would help you ou.:
Public Class SelectObject
<CommandMethod("SelectObject")> _
Public Sub SelectObject()
Dim myDWG As Document = Application.DocumentManager.MdiActiveDocument
Dim myPER As PromptEntityResult = myDWG.Editor.GetEntity("Select:")
Using myTrans As Transaction = myDWG.TransactionManager.StartTransaction
Dim myEntity As Entity = myPER.ObjectId.GetObject(OpenMode.ForWrite)
'Color
myEntity.ColorIndex = 3
myTrans.Commit()
myEntity.Dispose()
End Using
End Sub
End Class