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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Referencing Sketch Feature Parameters to drive dimensions within Sketch Section

ghuebscher
4-Participant

Referencing Sketch Feature Parameters to drive dimensions within Sketch Section

My goal is to reference a defined local "sketch feature" parameter from the "sketch section" associated with the same sketch feature.  Intent is to define a sketch dimension to the value of the parameter.

Creo help suggests that the way to do this is by qualifying the parameter name with the feature ID, such as:

    <param_name>:<feature_id> or :<feature_name>

or perhaps

    <param_name>:FID_<feature_Id> or :FID_<feature_name>

both forms have been tried.  These referencing syntax forms are not working.

 

Example:

  Sketch SK_123 exists with Feature Number 10 and Internal Feature ID 50 (obtained via Feature Information).

 

  Within "Feature SK_123 id 50" (given in the Relations dialog when "Look In" is "Feature") parameter ABC is defined.

 

  Within "Section 1 of Feature SK_123 id 50" (given in the Relations dialog with "Look In" is "Section") is relation sd0 = ABC:50 (or ABC:10 or ABC:FID_50 or ABC:FID_10 or ABC or any of the other variants noted above), where sd0 is a dimension.

 

Result is:  "Relations have errors"

 

If I do not qualify the parameter name, then a Part level (top level) parameter is created which is what I do not want.

 

Any ideas how to make this referencing work?  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

I think the problem is that section relations (that is, the ones that have the sd0 "sketch dimensions") can only reference part parameters:

pausob_2-1651270636299.png

 

 

However, you can make a sketch FEATURE relation that can drive the generated "feature dimension" to be equal to the value of other parameters in the model, including its own sketch FEATURE parameters (in which case, the :FID_xxxxx syntax is unnecessary):

pausob_0-1651270464286.png

note how there is that bit of that magic that happens as sd0 becomes d27...  I never really understood why Creo works this way, but...

 

 

View solution in original post

5 REPLIES 5

I think the problem is that section relations (that is, the ones that have the sd0 "sketch dimensions") can only reference part parameters:

pausob_2-1651270636299.png

 

 

However, you can make a sketch FEATURE relation that can drive the generated "feature dimension" to be equal to the value of other parameters in the model, including its own sketch FEATURE parameters (in which case, the :FID_xxxxx syntax is unnecessary):

pausob_0-1651270464286.png

note how there is that bit of that magic that happens as sd0 becomes d27...  I never really understood why Creo works this way, but...

 

 

ghuebscher
4-Participant
(To:pausob)

Yes that worked!  Relations within the section are locally solve, but with this approach it appears the relation results are subsequently "pushed" into the section.

 

After I made the change, two re-generations were required to get all geometry to update so seemingly the 1st pass re-calculation resolves the value within the sketch feature, then the 2nd pass re-calculation provides that value to the section (and other things are dependent upon that section so they did not update initially).  Depending on how many times calculated values pass from sketch feature to section, it might imply the number of necessary re-calculations could grow to well more than two.  Likely to potentially confusing to subsequent users of the model.

 

Seems Creo could benefit from a solver that re-calculates as necessary until values resolve which is exactly what something like Excel does, calculates cell dependencies until exhausted.  I may need to plow through the config options, maybe it is buried in there.

 

Thank you for the insight!

Well, not sure why you needed 2 regenerations; your explanation about the sketch section updating only after the sketch feature parameters are updated does not sound right to me.  Also, the feature order does not determine the evaluation order, as demonstrated here:

pausob_0-1651694265228.png

feat3 has relations which make it depend on feat1 parameters

similarly, feat2 depends on feat3

 

after modifying feat1 parameters, only 1 regeneration is required to update all features.

 

2 regenerations imply some quasi-circular (semi-circular?) logic..  I would look into the "sort relations" function to see if that eliminates your issue.

For relations, I've found that using feature relations was a really problematic means of getting what I want. For one thing, there's the problem you are facing (I think), not being able to access parameters from another feature. Also, the thing I really came to hate about it is the relations defined inside a feature are, for all intents and purposes, hidden except when editing that particular feature. Models (that I created, no less) with feature level relations would behave unexpectedly, until I looked deeper and found that I had put relations in there in the past.

Also, if I want to modify the relations, I can't just edit relations, I have to redefine the feature, etc. It gets messy.

My experience with this has led me to the conclusion that I was far better off by:

(1) Renaming the important dimensions for me to things that make sense, like d27 -> thkPlate, etc.

(2) Creating and using part parameters for design values that I want to use in multiple features, or in notes, etc.

This way, if I'm diligent about grouping related equations together and use sufficient comments, it's easy for me to jump into a model from years ago and make necessary modifications for my current design needs.

ghuebscher
4-Participant
(To:KenFarley)

I agree that Creo could use some improvements with respect to advertising where relations and/or parameters are defined so that subsequent users (or myself) of the model do not have to go on a hunt in features, sections, parts, notebooks, etc.  Having said that, I find generally Info:Reference Viewer to be quite helpful, but then have to go into Tools|Relations then change the object type, click it (too many clicks).  A red dot next to the model tree row would be nice to at least highlight that there is something to investigate with a direct right-click function (they seem to have a right-click for the item parameters, but not relations!).

 

I'm interested in this as we have a component that requires an arbitrary number of calculated sketches to make a loft.  The usual solution is to use the sketch *section* relations for this, but any new parameter on any sketch gets dumped into the list of parameters for the part (i.e. they are really part parameters, not section parameters).  Thus the variables in each sketch section must be named so as to disambiguate them from all the parallel variables in the other sections (i.e. ALPHA_A, ALPHA_B, ALPHA_C, for the same angle dimension for sketch A, B, C, ...Z, AA, AB, ... etc.  Thus the idea of having a very local set of calculations with parameters hidden from the rest of the model is attractive as it would allow the introduction of a new sketch with all relations without having to create a bunch of new names (other than the linkup of whatever will drive the new sketch).

 

Creo always seems to have all this interesting capability, but with a lot of caveats.

 

Thanks for the input!

Top Tags