Hi All, it’s my first time posting on here. I am used to using Creo Parametric for my designs and I usually parametrise my parts to make it easy to modify in the future.
I was wondering if there is a way to run Creo parametric, load file, make an edit and export this file using an external program such as MATLAB. I would like to do this because I will be exporting 1000’s of versions of the same file just at different geometrical values and wanted to automate the process and run my analysis on MATLAB automatically. Any response is appreciated
Solved! Go to Solution.
Look into Creo|SON. I don't know for sure, but I am guessing it should be fairly easy to get MATLAB to send out the JSON requests and thereby command Creo to change the model's parameters, regenerate, and then output a named STL file...
There is no direct conduit that I am aware of to MATLAB. You can probably do it by using Toolkit or one of the other APIs to link Creo to MATLAB but it may not be worth it. If you can describe the scenario in more detail, then someone may offer up an alternative to using an API.
I have wanted to do the same thing with Mathematica but there is no pipe available as a third party app that I am aware of. PTC offers Mathcad which can directly provide parameters used to drive Creo models.
Thank you for your response. In basic terms, I have a design based on three parameters in Creo: X1, X2 and X3. I am conducting an analysis in MATLAB using STL files from this part and I am examine the effect of changing X1, X2 and X3.
currently I manually go to creo and change these parameters and export as STL, however this isn’t practical considering I will have to change X1, X2 and X3 across a high range of values. If there is a way for MATLAB to communicate with creo, and change those parameters and export the STL file automatically it would be amazing
That seems straightforward. Several options come to mind.
Creo does have a Visual Basic API that will work with Excel. If you can generate the parameters in Excel quickly this may be the way to go.
I would take a look at Pro/Batch functionality within Creo.
https://www.ptc.com/en/support/article/CS139340#CREO_BATCH
Check out this Excel API app from 3rd party
https://www.simplifiedlogic.com/nitro-cell
Thank you for the help, I’ll check those out.
What about using family tables in Creo to generate your modified designs, then export each instance?
Look into Creo|SON. I don't know for sure, but I am guessing it should be fairly easy to get MATLAB to send out the JSON requests and thereby command Creo to change the model's parameters, regenerate, and then output a named STL file...
Hi,
generating 1000 model variants in Creo an saving them into STL is not such a big problem.
Trail file can be used for this purpose.
Example how to get sample trail file.
Open trail.txt.n file ... you will see code that represents the above actions.
You can remove code representing step 6.
You can copy code representing steps 3-5 and enter new values.
Using simple program, you can generate trail file for 1000 model variants.
When finished you replay this trail file in Creo and after some time you will have 1000 files.
Well, now the more complicated part ... how do you process these 1000 files in MATLAB ? I do not know.