×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Determine, using a built-in expression system 'function', the name of the current Arrangement

Determine, using a built-in expression system 'function', the name of the current Arrangement

Determine, using a built-in expression system 'function', the name of the current Arrangement

(OP)
Is there currently a built-in expression system function to query the name of the current Arrangement? As of Jan 2013, there was not, and this was discussed in this thread: http://www.eng-tips.com/viewthread.cfm?qid=337317

I would like to know if there is a better solution than that proposed in the thread: running VB journal code. I find this unsatisfactory since the code must be run to update the expressions each time the Arrangement is changed.

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

No there is not. In fact, this is something that I've asked for but it has not yet been implemented. If you would like to add your vote for this, please contact GTAC and have them open an ER (Enhancement Request) to this effect.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

(OP)
Thanks John. I will have an ER submitted.

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

So... As the expressions guy, my next question would be, "If you had this function, what would you do with it?" smile

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

A couple of thoughts on this one...

There's actually a Check-Mate function (in the same Knowledge Fusion language used by the expressions system) that returns all of the information about the arrangements in the current work part. With a bit of finesse, this can be used within a string expression to return the name of the current arrangement, like this:

CODE --> Knowledge_Fusion

@{
  $arr_info << mqc_askArrangementInformation();
  $current_arr << Loop 
  {
  For $a In $arr_info;
    If ( third($a) == TRUE ) Return second($a);
  };
} 

Put simply, this little bit of code loops through the list of arrangements and returns the name (string) of the "active" arrangement.

Now...

With that said, changing arrangements does not trigger a full model update in NX. As such, nothing triggers this expression to update if/when the arrangement is changed. Touching the formula of the expression [by adding or removing a space character at the end, for instance] and reevaluating it will get you an updated answer, but there's not an easy way to make that expression go through an update when the arrangement changes. Even consuming this expression in something like a PMI note doesn't quite get the job done.

And so yes... if you really need this arrangement name (and I'd still love to understand the larger workflow/dataflow in which you would consume it) then you'd want to be sure to include this update requirement in your ER. smile

Does that help a bit?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

Taylor, the use that I needed it for awhile back was to overcome an issue with Measurements and Arrangements. Measurements are Arrangement specific so if I needed to use a Measurement in some sort of expression formula, once I know which measurement goes with which arrangement, if I could then query the system for the name of the current arrangement, I would know which measurement value to use in my expression formula.

Also this could be used in the context of a Drawing of an Assembly if someone wanted to link the name of the current arrangement to say a note on the face of the Drawing or to a PMI notation.

As for the updating issue, I'll bet if you selected the 'Update for External Change' option from the 'Tools -> Update ->' menu that the arrangement name would update as well. Granted, this is a 'heavyweight' update as everything, including the feature tree in the model, will update, but it does seem to cover all situations as long as you can live with the time it may take to do a complete update.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

(OP)
Taylor,
I would like to model an assembly that has multiple configurations during operation, each one represented by a separate Arrangement. Further, I have parameterized components that change shape depending on the configuration (Arrangement). These are deformable in the sense that the shape changes, but the shape can not be determined from a measurement of endpoints as you might be able to do with a spring, but the shape is determined by the state which I can get from the particular Arrangement.

Triggering a model update upon changing the Arrangement would be a requirement in this case too.

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

Why do not you make arrangement to change based on expression (and you can command change of model configuration dimensions by changing value in expression that have 1 for first configuration, 2 for second etc.) instead shape to change based on arrangement?

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

Why do not you make arrangement to change based on expression (expression can be connected so change of size or shape trigger different arrangements) instead shape to change based on arrangement?

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

(OP)
Ivan,
This sounds like a creative solution and I would take it, but I am not aware that an arrangement can be triggered based on the value of an expression. Do you know otherwise?

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

John (and Dave) --

For reference, "Tools --> Update --> Update for External Change" does in fact appear to kick this hard enough to cause the necessary update.

Unfortunately, the more convenient "Update Values from External Spreadsheet" button inside the Expressions dialog does not.

Both of the use cases you've described are interesting... Please make sure that you submit an ER for this.

Thanks!

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

DaveMika --

The process you describe is something we can do quite easily with expressions driving parametric models. But this capability doesn't drive the NX "Arrangements" functionality, specifically.

It's quite common to drive any number of parametric updates (including model size and shape, feature suppression/unsuppression, assembly component positioning and/or suppression) based on a set of key expressions. One small step beyond that, it's also very simple to add a simple Product Template interface to present the user with those basic options in a well-labeled simple dialog format. But we would just call this "parametric modeling" or a "Product Template" and wouldn't use the "Assembly Arrangements" terminology, because that has a very specific meaning in the NX world. smile

But for the record, Product Template Studio *does* allow you to include an assembly arrangements option menu on a Product Template interface dialog.

Does that help at all?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

(OP)
Taylor,
I am beginning to think to abandon Arrangements altogether and take the approach you suggest as I have run into other difficulties. It seems that measurements are incompatible with Arrangements as they don't seem to update across Arrangements (ref http://www.eng-tips.com/viewthread.cfm?qid=280397). I need this, for example to query distances so I can set expressions.

Tell me, if I take your suggestion, is there a way for expressions to drive (suppress/unsuppress) constraints?

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

"DaveMika (Mechanical)(OP)5 Jan 16 15:52
Ivan,
This sounds like a creative solution and I would take it, but I am not aware that an arrangement can be triggered based on the value of an expression. Do you know otherwise?"

There is (I was working in NX 8.5) but I do not remember it, it was three years ago when I used that function to set arrangements by expression values. I had three arrangements (A, B, C) and they where commanded by position along array. So 1=A 2=B 3=B 4=C 5=A ... and B could repeat two or three times based on user input in Product Template Studio.

I can't dig it out as I changed company and I do not have access to that model. Sorry.

PS. If you do not get answer here soon, I will try to contact my ex-colleagues and ask them, I think it would be useful to know that function for me too.

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

Quote (DaveMika)

is there a way for expressions to drive (suppress/unsuppress) constraints?

That would be a great Enhancement Request for Assemblies. And you would not be the first to request it.

And for the record, as one of the NX Product Managers, piling on *does* help. winky smile

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

Quote (DaveMika)

I am not aware that an arrangement can be triggered based on the value of an expression. Do you know otherwise?

IvanNX had a creative solution here... not entirely orthodox, but it works. I suspect he was borrowing the KF that PTS uses to change arrangements and using that in an expression formula. Again, that works, even though ew haven't officially exposed it in the Expressions dialog. That route might look something like this:

1. Create an expression to be the "index", or the driver of the choice (I used "Arr_choose" here.)

2. Create a conditional expression that looks at the "index" and chooses one of the existing arrangements based on that input (I used "ARR_set" here.)



Note that the "Type" of "Arr_set" is BOOLEAN. This is because the %ug_setAssemblyArrangement() function returns a Boolean. (Again, this is not a function we normally expose to customers through the Expressions dialog...)

The logic inside "ARR_set" looks like this:

CODE --> Knowledge_Fusion

if (Arr_choose=1) then (%ug_setAssemblyArrangement( "Stowed" )) 
else if (Arr_choose=2) then (%ug_setAssemblyArrangement( "25% Deployed" )) 
else if (Arr_choose=3) then (%ug_setAssemblyArrangement( "50% Deployed" )) 
else if (Arr_choose=4) then (%ug_setAssemblyArrangement( "75% Deployed" )) 
else (%ug_setAssemblyArrangement( "Fully Deployed" )) 

Which should be fairly self-explanatory.

And so yes... That's another interesting option. Thanks, IvanNX. smile

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)

RE: Determine, using a built-in expression system 'function', the name of the current Arrangement

(OP)
Thanks Taylor and IvanNX,

The last piece I need to make this work is to query and make use of measurements while changing arrangements. That is, as the arrangement changes, the relative positions of components change; some require updates based on the new configuration (e.g. a spring length must update based on some kinematic relationship that cannot easily be determined from an expression).

I note that measurements only work as expected in the default arrangement. If a measurement is created in the default arrangement and the arrangement is changed, the measurement does not update. Further, attempting to define measurements in the non-default arrangement results in unexpected results when this is attempted with moved components. Toggling the "default" arrangement doesn't solve it either as it just breaks the measurements as well.

Is there some other trick out there?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources