hi, here, i want to use the viewpoints data contained in the clash detection results in Navisworks2013, but the api didn't provide any methods to access those data,so is there anyone can tell me how to extract the viewpoints data from those clash results?
yes, this is not exposed. Sorry for the bad news. But you can still use COM API to get it:
Unfortunately the "it worked in the old version" doesn't really help people who's entire code base is written in the old API. I have figured out a way to find a clashes viewpoint by creating a new viewpoint via...
Viewpoint vp = new Viewpoint();
then these 2 lines...
vp.Position = new Point3D(clashResult.Center.X+75, clashResult.Center.Y+30, clashResult.Center.Z-10);
vp.PointAt(new Point3D(clashResult.Center.X, clashResult.Center.Y, clashResult.Center.Z));
will make 'vp' the clashes viewpoint.
However the functionality is still below average at best because even viewpoint lacks all the functionality of the InwOpAnonView and InwNvViewpoint.
For instance is there a way to recreate this code block with the new Viewpoint class??
var vpdAnonView = (InwOpAnonView)VpdPluginLauncher.pluginState.Objec
(nwEObjectType.eObjectType_nwOpAnonView, null, null);
vpdAnonView.ViewPoint = myViewpoint;
Bitmap pic = Microsoft.VisualBasic.Compatibility.VB6.Support.IP
so that I can create a picture of the viewpoint.
I'm getting tired of the answers to 2013 api questions being, "ya we didn't expose that in the new Api, but you can use it in the old api". Then why did you even build a new API to expose more functionality and a better question why did you not create functionality to be able to convert the old ClashResult objects and old Viewpoint objects to the new api. It seems to me all you did was rearrange classes expose new functionality and then hide old functionality, it makes no sense.
Thanks for your comments.
Firstly, could you take a look if the other post helps a bit?
The .NET API is NOT just a rearrangement of the existing COM API and wrap them. It encapsulates the core code of C++. I believe there is some considerations that our engineer team did not expose the ability of exporting viewpoint /clash image. Sometimes, it would not mean it is a small job, though it looks the old COM API has the similar ability. Or probably it may happen not to be in the bucket in this release. We have had a wish to ask the ability to export image of clash result in .NET API. I cannot gurantee, however I appreciate your understanding and patience. I also welcome you join the annual survey of API wish which would happen in mid-year. The survey of this year for the next release has ended.
Access a broad range of knowledge to help get the most out of your products and services.