Skip to main content
1-Visitor
May 15, 2020
Solved

Creo Distributed Batch to Run Matco

  • May 15, 2020
  • 6 replies
  • 5122 views

I need to add an annotation feature note to ~300 parts. I wrote a maco that will add the feature and it seems to work well. I tried setting up distributed batch to call this macro that adds the feature and then saves the file to the working directory. The process will run processing ~10 parts at a time and states it completed my 105 test objects successfully. However, when I go to the output file location there are only about 40 new parts in there. If I run the distributed batch process with only one of the objects it "missed" in the object list it will work fine on that file. How can I troubleshoot this or is there a better way to do this?

Best answer by MartinHanak

@motormayhem wrote:

I need to add an annotation feature note to ~300 parts. I wrote a maco that will add the feature and it seems to work well. I tried setting up distributed batch to call this macro that adds the feature and then saves the file to the working directory. The process will run processing ~10 parts at a time and states it completed my 105 test objects successfully. However, when I go to the output file location there are only about 40 new parts in there. If I run the distributed batch process with only one of the objects it "missed" in the object list it will work fine on that file. How can I troubleshoot this or is there a better way to do this?


If I were you I would use trail file.

Step 1: Launch Creo, modify 1 part, end Creo session ...  trail file is created.

Step 2: Using trail file generated in Step 1 generate new trail file repeating the code related to 1st part.

Step 3: Launch Creo and play trail file generated in Step 2.

 

6 replies

24-Ruby III
May 15, 2020

@motormayhem wrote:

I need to add an annotation feature note to ~300 parts. I wrote a maco that will add the feature and it seems to work well. I tried setting up distributed batch to call this macro that adds the feature and then saves the file to the working directory. The process will run processing ~10 parts at a time and states it completed my 105 test objects successfully. However, when I go to the output file location there are only about 40 new parts in there. If I run the distributed batch process with only one of the objects it "missed" in the object list it will work fine on that file. How can I troubleshoot this or is there a better way to do this?


If I were you I would use trail file.

Step 1: Launch Creo, modify 1 part, end Creo session ...  trail file is created.

Step 2: Using trail file generated in Step 1 generate new trail file repeating the code related to 1st part.

Step 3: Launch Creo and play trail file generated in Step 2.

 

1-Visitor
May 15, 2020

Hmm ok. I believe I came across another post where you wrote some code to help develop the repeating trail file correct? Would that work here? I wouldn't need the macro as the trail file would cover the operations required to add in the annotation feature? Essentially is ends up being one long trail file with the operations for each file in it, is that correct?

24-Ruby III
May 15, 2020

I believe I came across another post where you wrote some code to help develop the repeating trail file correct?

  • Yes

Would that work here?

  • Yes

I wouldn't need the macro as the trail file would cover the operations required to add in the annotation feature?

  • Yes

Essentially is ends up being one long trail file with the operations for each file in it, is that correct?

  • Yes

 

18-Opal
May 15, 2020

While a Trail File can be useful - they are difficult to prune down, setup and make useful (heavy debug cycle).  They are a bit like a sledge hammer for ALL nails in the end - assuming everything is a "nail" that needs to be hit - vs a program / script that can evaluate if something needs to be done.

 

For a situation like this... CREOSON can easily be used to load models, look for annotations (notes) and then allow you to decide to process the model or not running your mapkey.   It is quite easy to do via Python (CREOPYSON) or JavaScript (included in the CREOSON distribution).

 

If you prefer the dBatch approach and Trail Files... then CREOSON is also good for identifying which models need to be processed vs hitting everything with the same script (risky).

 

Hope that helps.

 

Dave