cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom functions in the relations dialog?

SOLVED
Alexandrite

Custom functions in the relations dialog?

Lets say instead of sin(x) I wanted to have a function square(x) where the function "square" would be the equivalent of x=y^2. Thus typing in a = square(2) would result in a value of 4 for "a".

If no one knows how to do this maybe I will fill out an enhancement request for it. I opened up a ticket with PTC, but wanted to see if anyone else had a cleaver idea here.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Custom functions in the relations dialog?

This looks relevant. PTC Creo - PTC Creo 3.0 Top Enhancement: PTC Mathcad Integration

Skip the video, which does not show Mathcad Integration.

It is the same as the Excel analysis uses. I guess the integration is storing the Mathcad file inside the part or assembly file so they won't get separated.

Also this, however tedious it is. Nothing like a tutorial that includes slowly typing arbitrary names. http://learningexchange.ptc.com/tutorial/176/mathcad-and-creo-elements-pro-5-0-integration

Tutorial: Link PTC Mathcad Prime 3.1 Input Regions to PTC Creo Parametric Parameters This one I had to watch twice; there are a number of false leads that have nothing to do with the task at hand, such as hiding/unhiding items and reorienting the views for no reason except to confirm measurements that were already obvious and could be made in the trimetric orientation.

6 REPLIES 6

Re: Custom functions in the relations dialog?

It would make thing a little simpler but I am not sure you would save anything since it is no different than a^2. typically you would assign a second variable anyway, so aa=a^2 would be the same as aa=square(a). And why would you stop at square; what about cubed and above?

Re: Custom functions in the relations dialog?

Square was just for purposes of discussion. My actual equation that I want to turn into a function is a lot more complicated. I would rather not have to copy it a dozen times and then have to go back in, find and replace parts of it when it changes.

Re: Custom functions in the relations dialog?

Relations is not a general purpose language, so there are no user-defined functions or subroutines. I keep hoping they integrate with something like AutoIt, but so far, no luck.

While J-Link and Weblink can offer what you are looking for, those act on the models, not from within the models; maybe an Excel analysis can be used?

Re: Custom functions in the relations dialog?

For more complex functions you can use Mathcad Express in connection with Creo Parametric.

What is Mathcad Express?

Highlighted

Re: Custom functions in the relations dialog?

This looks relevant. PTC Creo - PTC Creo 3.0 Top Enhancement: PTC Mathcad Integration

Skip the video, which does not show Mathcad Integration.

It is the same as the Excel analysis uses. I guess the integration is storing the Mathcad file inside the part or assembly file so they won't get separated.

Also this, however tedious it is. Nothing like a tutorial that includes slowly typing arbitrary names. http://learningexchange.ptc.com/tutorial/176/mathcad-and-creo-elements-pro-5-0-integration

Tutorial: Link PTC Mathcad Prime 3.1 Input Regions to PTC Creo Parametric Parameters This one I had to watch twice; there are a number of false leads that have nothing to do with the task at hand, such as hiding/unhiding items and reorienting the views for no reason except to confirm measurements that were already obvious and could be made in the trimetric orientation.

Re: Custom functions in the relations dialog?

Thanks to both of you. I think this is probably the closest I will get.