Skip to main content
8-Gravel
March 22, 2025
Question

Is it possible to obtain the dimension object driven by a parameter through the toolkit? (Creo 8.0)

  • March 22, 2025
  • 1 reply
  • 1455 views

Is it possible to obtain the dimension object driven by a parameter through the toolkit? Or can you retrieve which parameters drive a given dimension?
 I've tried various methods but still can't associate the driven dimension with the parameter by toolkit. Even using the ProFeatureExternParentsGet function only know which model it's related to. The only method I can think of right now is to parse all the relations, but this raises another issue: if there are logical conditions like if-else-endif in the relations, it makes the parsing process more complicated. I'd like to know if there are other ways to achieve my goal.  Thank you very much!

xiaoyi_0-1742656357703.png

xiaoyi_1-1742656381025.png

 

 

1 reply

RPN
18-Opal
March 22, 2025

extern ProError ProDimensionIsReldriven (
ProDimension *dimension,
ProBoolean *rel_driven);

/*
Purpose: Determines whether the specified dimension is rel_driven.

Input Arguments:
dimension - The dimension handle.

Output Arguments:
rel_driven - The dimension rel_driven ((PRO_B_TRUE or PRO_B_FALSE)).

Return Values:
PRO_TK_NO_ERROR - The function successfully retrieved the
information.
PRO_TK_GENERAL_ERROR - The data structure was not set.
*/

xiaoyi8-GravelAuthor
8-Gravel
March 24, 2025

Thanks for your reply, but ProDimensionIsReldriven only tells the user which dimension is driven by the relation; we can't determine which parameters are driving it.

RPN
18-Opal
March 24, 2025

This was your question 

 

Is it possible to obtain the dimension object driven by a parameter through the toolkit?



With this call I mentioned, you know the LHS of the expression. The right side may evaluated by a regular expression, because you may not have a single parameter on this side, or you may have a function as well, So your approach may require a lot of code because you need to evaluate any token. A single value is easy, because it will tell you everything about the reference