Importing a CSV file as actual data

Importing a CSV file as actual data

d.yeager
Advocate Advocate
1,470 Views
3 Replies
Message 1 of 4

Importing a CSV file as actual data

d.yeager
Advocate
Advocate

I have a new piece of equipment coming in, and I am trying to figure out how to perform a certain type of inspection.  I am told the new equipment will not do what I want directly, but is able to output a file containing the data of the measured points.  I think I found that I can then import that into Power Inspect, but that is where I am lost.  Can someone help here?

 

0 Likes
1,471 Views
3 Replies
Replies (3)
Message 2 of 4

dmitriy.dolgikh
Autodesk
Autodesk

This can be done via the Automation API. The key function is ReplayWithPoints(...). What are your thoughts about how you will be creating the items in the tree?

 

The following pseudo-code demonstrates how data could be "imported" via a script:

 

var circle = group.SequenceItems.AddGeometricItem(pwi_ent_Feat_ProbedCircle);

var flags = rpf_CMM_COORDINATES_POINTS + rpf_UNIT_MILLIMETERS;
var probe_dia = 1.930;
var cmm_points = pi.CreateLocalObject("PWIMathBox.CMMPoints");
cmm_points.ProbeDiameter = probe_dia;

cmm_points.Clear();

// HERE YOUR ACTUAL DATA WILL NEED TO GO FROM THE 3-RD PARTY SYSTEM

// ---

cmm_points.AddXYZIJK(61.289, 49.171, -2.348, -0.83510, -0.55010, 0.00000);
cmm_points.AddXYZIJK(61.897, 46.337, -3.735, -0.98735, 0.15856, 0.00000);
cmm_points.AddXYZIJK(54.195, 45.586, -2.254 , 0.93817, 0.34616, 0.00000);
cmm_points.AddXYZIJK(55.579, 50.194, -3.114, 0.59225, -0.80576, 0.00000);

// ---
circle.ReplayWithPoints(measure, probe_dia, cmm_points, flags);

 

 

I hope it helps,

Dmitriy

Message 3 of 4

d.yeager
Advocate
Advocate

What we have been doing is using "single points on the fly" in Power Inspect.  I am not sure where/how I should use the script you gave me.

0 Likes
Message 4 of 4

dmitriy.dolgikh
Autodesk
Autodesk

You are right, it could be done simpler and without scripting. You can use "single points", surface groups or you can import the CSV data as a point cloud and then use the points to project on a CAD or to create pretty much any geometry.

 

If your 3-rd party system is based on probing then the easiest would be if you export compensated points.

0 Likes