hexagon logo

Move Increment to Move Point Conversion Script?

Confused Is anybody familiar with a script that will scour your program and replace all the Move Increments with Move Points in the alignment context in which the moves reside? My team really doesn't like Move increments, but I really like the convenience while programing. It would be neat if there were a macro that converts them all with a click of a button.Confused
Parents


  • I'm a little bummed to be as busy as I am, this seems like a fun thing to play with. I am kinda working on it in the back of my mind and I think I have cleared some to the hurdles.

    You can identify move commands in the program with the IsMove Property. Link to Help file: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/mergedProjects/automationobjects/webframe.html#PCDLRN~Command~IsMove.html

    I haven't gotten as far as finding how to distinguish incremental moves from the other types of moves. May need to use gettext to find the command information to sort it out.

    It looks like selecting the features to be executed can be done with the SetExecutionBlock Method. Link to Help file: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/mergedProjects/automationobjects/webframe.html#PCDLRN~PartProgram~SetExecutionBlock.html

    I think it can be executed with the EXECUTE Method (Odd how it is in all caps in the documentation, as if it's extra important): Link to Help file: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/mergedProjects/automationobjects/webframe.html#PCDLRN~Command~EXECUTE.html

    That's as far as I have got. I haven't gotten as far as finding a way to insert a move point command on the desired line of the measuring routine or deleting the move increment command that is replacing it.

    Once it is all figured out, I'm not sure if such a script can be run from the Basic Script Editor built into PC-DMIS or if it would need to be run externally from something like an Excel script or a .bas file. The later versions of windows 10 now support executing .bas files just by double clicking on them, so that wouldn't be too hard to implement if needed.



    This could be done via the basic script editor, I prefer using excel/visual studio so its external of pc-dmis.

    I think your idea is solid for this - selecting the feature before and after the move/increment then executing the block then creating a move point and cleaning up. I wish I could be of some assistance, however my current role I don't have the ability to test with our pc-dmis seat.

    Another way of accomplishing this may be a programmable keypad using find/replace now that I'm thinking about it. You could program a lot of these keystrokes in one or two button presses. I'm not an expert with keypads, but some other people on here might be able to give more insight on that.
Reply


  • I'm a little bummed to be as busy as I am, this seems like a fun thing to play with. I am kinda working on it in the back of my mind and I think I have cleared some to the hurdles.

    You can identify move commands in the program with the IsMove Property. Link to Help file: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/mergedProjects/automationobjects/webframe.html#PCDLRN~Command~IsMove.html

    I haven't gotten as far as finding how to distinguish incremental moves from the other types of moves. May need to use gettext to find the command information to sort it out.

    It looks like selecting the features to be executed can be done with the SetExecutionBlock Method. Link to Help file: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/mergedProjects/automationobjects/webframe.html#PCDLRN~PartProgram~SetExecutionBlock.html

    I think it can be executed with the EXECUTE Method (Odd how it is in all caps in the documentation, as if it's extra important): Link to Help file: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/mergedProjects/automationobjects/webframe.html#PCDLRN~Command~EXECUTE.html

    That's as far as I have got. I haven't gotten as far as finding a way to insert a move point command on the desired line of the measuring routine or deleting the move increment command that is replacing it.

    Once it is all figured out, I'm not sure if such a script can be run from the Basic Script Editor built into PC-DMIS or if it would need to be run externally from something like an Excel script or a .bas file. The later versions of windows 10 now support executing .bas files just by double clicking on them, so that wouldn't be too hard to implement if needed.



    This could be done via the basic script editor, I prefer using excel/visual studio so its external of pc-dmis.

    I think your idea is solid for this - selecting the feature before and after the move/increment then executing the block then creating a move point and cleaning up. I wish I could be of some assistance, however my current role I don't have the ability to test with our pc-dmis seat.

    Another way of accomplishing this may be a programmable keypad using find/replace now that I'm thinking about it. You could program a lot of these keystrokes in one or two button presses. I'm not an expert with keypads, but some other people on here might be able to give more insight on that.
Children
No Data