[Ra...] Posted 20 hours ago Share Posted 20 hours ago (edited) Going to a PCM class in a few months, but I'm trying some projects on my own. Hoping to get some help. I want to create a csv of raw data of a feature in inches. The export points function works, but it's always in metric, and it is space separated, which creates extra work on my end. My idea is to get the total number of points in the feature, and loop through each point, grab the x, y, z, convert to inches, add to file, end loop at the total number of points. Questions: Is there syntax to grab the total number of points from a feature? If so, what is the syntax to get point 1, then point 2, etc. Is this method worth trying? Or is there a simpler way that I'm not thinking of? Thanks. I appreciate any help. Edited 20 hours ago Link to comment Share on other sites More sharing options...
[Ch...] Posted 20 hours ago Share Posted 20 hours ago seems possible, if you have 2024 or later there are some hidden built in excel functions for PCM I believe. good luck. Link to comment Share on other sites More sharing options...
[Ra...] Posted 18 hours ago Author Share Posted 18 hours ago Found an old post where Eric Moberg shared this: getNominal("feature").numberOfNomPoints But I believe it only works with curves. I might play around creating curves for the export. Link to comment Share on other sites More sharing options...
[Ra...] Posted 15 hours ago Author Share Posted 15 hours ago path="C:\Users\xxxxx\Documents\TXT Data\" name=getRecordHead("planid")+"_"+getRecordHead("partnbinc") ext=".csv" dirpath=path+name+ext addToFile(dirpath,"X,"+" "+"Y,"+" "+"Z,") conv=(1/25.4) for i=1 to 8 px=getActual("H05_SPD"+i).x *conv py=getActual("H05_SPD"+i).y *conv pz=getActual("H05_SPD"+i).z *conv addToFile(dirpath,px+","+py+","+pz) next i The above works as a proof of concept... Unfortunately, only for this very particular group of 8 individual points. I would still like this code to be able to: syntax for the amount of points for any specific feature. Freeforms, curves, planes, etc. Not sure if it is possible. Access of the x, y, z of each individual point. Hopefully by being able to loop. Removing the "d" at the end of every coordinate number. I can't seem to find anything for the above in the PCM manual included in the documentation provided by Zeiss. Right now, I'm just going through Moberg's post history, hoping to find some hidden nuggets haha. Link to comment Share on other sites More sharing options...
[Ra...] Posted 14 hours ago Author Share Posted 14 hours ago path="C:\Users\xxxx\Documents\TXT Data\" name=getRecordHead("planid")+"_"+getRecordHead("partnbinc") ext=".csv" dirpath=path+name+ext addToFile(dirpath,"X,"+" "+"Y,"+" "+"Z,") conv=(1/25.4) curvep=getNominal("H10_CN139_N to P").numberOfNomPoints for i=1 to curvep px=getActualCurvePointCoord("H10_CN139_N to P","X",i) *conv py=getActualCurvePointCoord("H10_CN139_N to P","Y",i) *conv pz=getActualCurvePointCoord("H10_CN139_N to P","Z",i) *conv addToFile(dirpath,px+","+py+","+pz) next i Curve works. Now if I can get Freeforms to work I'll call this a success. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in