Hi,
I am trying to create a simple cube at the position of the mouse click through API. Is that possible?
Do I need to use uncreate for that?
Thanks!!
Anna
Thanks a lot Xiaodong! That works for me!
Two additional questions I have:
1) Is it possible for me to convert the graphics.Cuboid into an object/modelItem? The current Cuboid is temporary I think.
2) Can I get the Point3D of wherever I click in the model? I just know I can get the screen coordinate X and Y.
Anna
hi Anna,
1) no. the graphics RenderPlugin draws is a transient graphics. In addition, Navisworks is NOT a kind of software for designing. It is a software of management. Since it supports many formats of CAD file. It has no idea (at least currently) what is the relationship the additional object with the original model tree. two workarounds you could consider:
- prepare the additional object by the original CAD software, and append it to the existing model.
- use NWCreate API to create the file which contains the additional object, and append it to the existing model.
2) in the blogs, the code shows how to get the picked point ( 3D)
http://adndevblog.typepad.com/aec/2013/05/navisworks-2014-api-new-feature-inputplugin.html