hexagon logo

Creating Writelines for Points in a Program

I'm fairly new to CMM programming and PC-DMIS so go easy on me. I do not have much experience with writing code but after reading through this forum it appears that you can do a lot to automate some of the things I have to do within my programs. The program I'm working with now requires that I create a Writeline for each point taken within the program to write the Point name along with the Nominal XYZ IJK and Measured XYZ values to a text file. This is very tedious so I thought I ask about creating a script to do this for me.

The writeline currently looks like this where IP_1000 is the ID for the vector point. The script would have to create a writeline like this at the end of the program for each point.

FILE/WRITELINE,F1,"IP_1000"+" , "+IP_1000.X+" , "+IP_1000.Y+" , "+IP_1000.Z+" , "+IP_1000.TI+" , "+IP_1000.TJ+" , "+IP_1000.TK+" , "+IP_1000.TX+" , "+IP_1000.TY+" , "+IP_1000.TZ

Thanks in advance for any help you can offer.
Parents
  • Make a script that parses your program at the end of the run and if the command is a vector point, have it print the requested information to file. If you look at the sources from other scripts in here I am sure you'll find pieces that will take you a great way along your scripting journey.
Reply
  • Make a script that parses your program at the end of the run and if the command is a vector point, have it print the requested information to file. If you look at the sources from other scripts in here I am sure you'll find pieces that will take you a great way along your scripting journey.
Children
No Data