Skritp for fast and flexible renaming of many CAM operations

Skritp for fast and flexible renaming of many CAM operations

marcus.toepke
Collaborator Collaborator
695 Views
5 Replies
Message 1 of 6

Skritp for fast and flexible renaming of many CAM operations

marcus.toepke
Collaborator
Collaborator

Hello!
I have written a small script to rename several CAM operations at the same time.
You may know this, you have assembled a part in CAM and have edited several parts using the Copy operation.
Now you want to rename the operations, so that they are output in the NC program sensibly named.
This costs quite a lot of time with complex parts!
I have now solved this with my script ...

 

How use the script:
First select the CAM operations to be renamed!
Here it is to be considered that the order of the selection, the operations is considered!

Now start the script

 

marcustoepke_8-1690959448321.png

Now an input window opens:

marcustoepke_9-1690959484742.png

 

Here you can now enter how the operations are to be renamed.

 

- Variant 1:
Input: "Seite" and then confirm with a click on "OK".

Result:

 

marcustoepke_10-1690959519101.png


All operations are named with the basic designation "Seite" and then assigned a sequence number in the order in which they were SELECTED

 

- Variant 2:
Input „Seite~(B+90-C0,B+60-C15,B-90-C0,B45-C45)“

Result:

 

marcustoepke_11-1690959582931.png

 

The operations are renamed with the basic name "Seite" and get the list elements contained in the list inside "~(List)" appended!
"~(" is the trigger for the lists variant ")" closes the list.
Here it is to be noted that the number of list elements must correspond to the number of selected CAM operations!

 


- Variant 3:
Input "Seite_B~10,5.5"

Result:

marcustoepke_12-1690959668527.png

 

The cam operations are renamed with the basic name "Seite_B", then in the order of selection, first the start agrument 10 is appended, then with each following operation 5.5 is added and appended.
"~" is the trigger for this variant, the first argument is the start number, the second argument is the number to be added.

 

The only drawback it is in German

 

I would be happy if one or the other can use it!

 

696 Views
5 Replies
Replies (5)
Message 2 of 6

nubrandao
Collaborator
Collaborator

hi, nice macro, but there is a problem, everytime i tried to rename, it jump the numbering order

 

for example:

 

MOUD-01

MOUD-06

MOUD-02

MOUD-5

 

ETC

0 Likes
Message 3 of 6

Tomas_V_cz
Advocate
Advocate

I also like this macro. It would be possible to supplement the cript so that it would automatically supplement the text for drilling operations, for example:

drill a hole - and it would complete the diameter of the tool from the tool library.

and the output would be:

drill hole 10.

I think you could find another use for renaming operations.

Great

0 Likes
Message 4 of 6

marcus.toepke
Collaborator
Collaborator

@nubrandao 

Hmmm it rename the operations in oder it was selected

0 Likes
Message 5 of 6

nubrandao
Collaborator
Collaborator

I select all at once, should i select One by One?

0 Likes
Message 6 of 6

marcus.toepke
Collaborator
Collaborator

Try it simply

 

0 Likes