I was able to manually import point cloud into invent using attach option but, can't find a way to this programmatically using c#. Any help will be appreciated.
Solved! Go to Solution.
Solved by LishuangLu. Go to Solution.
Here's the VBA code that can import point cloud data into a new part document, I suggest you refer this VBA code to create the C# code.
Hopefully this is not too late to you.
Sub test()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject, , True)
Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition
Dim oPointCloud As PointCloud
Set oPointCloud = oCompDef.PointClouds.Add("Q:\transcripts\regression\PointCloud\FileDepot\car_house.rcp")
End Sub
Thanks,
-Lisa
Thanks Lisa for taking you time to answer my question.
But the problem is I have a collection of 0.1 million points (i.e x,y,z coordinates) I need to visit recap for indexing them in rcp. which I am unable to do programatically. And for the rest you have already given the code. Will it be possible for you to help me with the first part too.
thanks
Bigzen
Hi Bigzen,
Could I know why you want to do indexing these points from recap? As I know there's no such API to support the accessing from Inventor to recap.
If I know your purpose, maybe we could find some other workarounds.
Thanks,
-Lisa
The points are not output of 3d scan, they are computed. So i just have the coordinates. I can't write them directly to rcp file format. So, I am trying to write them into some open file format and convert them to rcp using recap and import rcp into inventor to show the point cloud along with my solid model..
Thanks
Bigzen
Hi Bigzen,
I can understand a bit. But could you share one example of the data that you want to do the indexing? I suppose the indexing you mean is like something 1, 2, 3, and could you share what kinds of style you want to generate?
Thanks,
-Lisa
I have points for say (x1,y1,z1),(x2,y2,z2)... . I can write them to any of the open point cloud format like xyz or pcd as the format of their content is known. but I want to attach these points to inventor as point cloud. for this I need to convert pcd or xyz file to rcs or rcp using recap. And then attach it. Is there any way to script this process or directly output my points to rcs format.
Thanks
-Lisa