hexagon logo

Tips for learning to write scripts.

Not sure how to delete the post. I did a few searches and found what I was looking for. Below is the original:


Hi All! Is there a tutorial that lays out the basics of writing scripts in PC-DMIS? I'm looking for something like a beginner manual.

Thanks!
Parents
  • That is possible, but certainly not a "starter" script. I wish I had time to write it for you, but perhaps you can find someone who already has something close. In the mean time, I suggest you start with something a little easier and work your way up. For example -

    write a script that reads the commands in the part program and displays their type information
    then tell it to only display the command information if it is a dimension
    then tell it to display the axis fields for those dimensions
    then tell it remove it from the edit window if it is a certain name
    then have it display a dialog and ask you which dimension name to remove using a text input
    then convert the dialog to use a listbox and allow you to select one dimension name to remove
    then code the listbox to allow for multiple selections for which dimensions to remove
    and so on

    I am not trying to be sarcastic here, I hope you don't take it the wrong way, but that is how I would proceed to develop that sort of project, one piece at a time, saving each one along the way.


    Thanks Don, that's some solid advice. I'll tinker a bit and see what happens!
Reply
  • That is possible, but certainly not a "starter" script. I wish I had time to write it for you, but perhaps you can find someone who already has something close. In the mean time, I suggest you start with something a little easier and work your way up. For example -

    write a script that reads the commands in the part program and displays their type information
    then tell it to only display the command information if it is a dimension
    then tell it to display the axis fields for those dimensions
    then tell it remove it from the edit window if it is a certain name
    then have it display a dialog and ask you which dimension name to remove using a text input
    then convert the dialog to use a listbox and allow you to select one dimension name to remove
    then code the listbox to allow for multiple selections for which dimensions to remove
    and so on

    I am not trying to be sarcastic here, I hope you don't take it the wrong way, but that is how I would proceed to develop that sort of project, one piece at a time, saving each one along the way.


    Thanks Don, that's some solid advice. I'll tinker a bit and see what happens!
Children
No Data