Attributes in assembly - dependent one from another
Attributes in assembly - dependent one from another
(OP)
Hello
I would like to make an assembly for example sth like this
top.prt
working.prt (attributes: "height=100")
electrode_1_working.prt (attributes: "startpoint=height+5")
electrode_2_working.prt (attributes: "startpoint=height+5")
Is there is any function that I can put in attributes in pre_part of electrode parts to make something like this ?
I would like to make an assembly for example sth like this
top.prt
working.prt (attributes: "height=100")
electrode_1_working.prt (attributes: "startpoint=height+5")
electrode_2_working.prt (attributes: "startpoint=height+5")
Is there is any function that I can put in attributes in pre_part of electrode parts to make something like this ?





RE: Attributes in assembly - dependent one from another
RE: Attributes in assembly - dependent one from another
RE: Attributes in assembly - dependent one from another
Now you will probably still need to use interpart expressions so that data (in this case the value of the Attribute) can be passed from one part to another.
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Attributes in assembly - dependent one from another
Part Name of expression Formula
working.prt height "55"
electrode_1_working.prt startpoint "working"::height
But how to make an attribute with value of startpoint expression?
RE: Attributes in assembly - dependent one from another
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Attributes in assembly - dependent one from another
Unzip the attached file and open the Assembly file 'top.prt'. Make 'working.prt' the DISPLAY part (simply making it the Work part is not adequate). Now go to...
File -> Properties -> Attribute
...and note the value of the Attribute 'HEIGHT' (don't make any changes yet). Now go to the Expression editor and note the Expression which is reading the value of the 'HEIGHT' Atrribute.
Now switch the DISPLAY part to 'electrode_1_working.prt' and go the Expression edito and note the interpart Expression as well as the Expression which converts the 'string' into a number and then adds your value of 5. Then note the expression which takes this new total height and feeds it to the Attribute 'STARTPOINT'. Now repeat the workflow diagramed above only this time noting the value of the Attribute 'STARTPOINT' (you will see that it's already set to 105, which is the value of the 'HEIGHT' Attribute in 'working.prt' plus 5, which is what you wanted, but let's just ignore that for now).
Now switch the DISPLAY part back to 'working.prt' and following the outlined workflow, go the the Part Attribute dialog only this time change the value of 'HEIGHT' to some other value, such as 150. Now hit OK and then go to...
Tools -> Update -> Update for External Change
This will force the new value of the Attribute to update the Expression.
Now switch the DISPLAY part back to 'electrode_1_working.prt' and once again perform the 'Update for External Change' operation which will assure that new Expression values will be properly passed and the Expression and Attributes are updated. Now go to the Part Attribute dialog and note that the 'STARTPOINT' Attribute has been updated and new value is 155 (or whatever value you entered for 'HEIGHT' in 'working.prt' plus 5).
OK, that's basically how you can pass the value of an Attribute in one part file to another, perform some mathematical operation on it and then use this value for an Attribute in another part file.
Now as for the issue of the multiple 'Updates for External Change', there is a known weakness in the Attribute update mechanism (which is being addressed in NX 8.0) and so for now we have to trigger it manually, and in this example, at BOTH ends of the 'data pipeline' (the Attribute value flowing from 'working.prt' to 'electrode_1_working.prt').
Now if you're going to do a lot of this sort of thing, do what I did; I used Customize to add an additional icon to one of my toolbars which when selected triggers an 'Update for External Change' operation. This makes the update issue relatively minor and soon, when NX 8.0 arrives, I won't have to worry at all about it.
Anyway, look at the files and see if you can apply what I've done to your models.
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Attributes in assembly - dependent one from another
RE: Attributes in assembly - dependent one from another
RE: Attributes in assembly - dependent one from another
RE: Attributes in assembly - dependent one from another
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Attributes in assembly - dependent one from another
First let's look at how the parts in my little example assembly interact with each other right out of the box.
Open the example assembly with the Load Options set with 'Partial Loading' toggled OFF (in other words, the parts will be fully loaded).
Make the so-called source part (named 'working.prt') either the Work part or the Displayed part and then do a...
File -> Save As...
...and enter a new name for the file (if the system asks about a new name for the assembly you can either give it a new name well or just hit cancel and it will continue without renaming the assembly). Now go back and make the 'electrode_1_working.prt' the displayed part and look at the Expression dialog and you will note that the interpart expression has been automatically updated to reflect the new name of the part file which was originally named 'working.prt'. What has happened is that since both the part file which was referenced and the part file doing the referencing were open in the same session, changing the name of referenced part automatically updated the interpart expression in the referencing part so as to keep the relationship valid. Of course you will still need to do a save operation on 'electrode_1_working.prt' to save these changes but you did not have to do this manually as long as you follow this workflow.
Now how can this behavior be leveragd to solve your problem of having template electrodes which could link to any new 'working' part?
OK, this is one way:
First create a dummy model representing the 'working' part file with the proper expressions and attribute as seen in my exmaple 'working' part. It does not need anything else in it. Give it some generic name as a place-holder.
Now design your electrode templates like my example with the proper interpart expression and attributes and so on with the interpart expression linked to this dummy part.
Now build your assembly using whatever electrode templates that you wish (I assume that you may have more than one each linked to a common 'working' part) and include in that assembly you dummy 'working' part and save it.
Now using the dummy 'working' part as you design template, open it (BUT DO NOT RENAME IT) and model whatever it is that you're going to be WORKING on, setting the HEIGHT attribute to whatever you need it to be and save it (you'll probably want to keep an extra copy of the 'working' part in some place where it's safe and where you can get a copy anytime that you need to perform this process).
Now open your assembly, move everything around where you want it, or if you're building it from scratch, fine as long as you have added the 'working' part (with it's dummy name intact) and your electrode parts so that they are all fully loaded. Now make the 'working' part the work part and do a save as and give it the actual name that you would like it to be and then save your assembly and perform the 'updates' and you should be good to go (remember to delete the original modified 'working' part that you added to the assembly before you renamed it, remembering that you still have that safe copy stashed away for the next time when you just repeat this process).
Anyway, this should allow you to create as many electrode templates as you wish, linking them all to the same dummy 'working' part and then use the workflow decribed above to link and update them all to a new 'working' part for each one of your projects.
And I also hope that this helps show you how powerful and useful the NX architecture is when doing some of these interpart tasks, even the ones which does not rely on WAVE. Interpart Expressions are almost as old as expressions themselves and are still very useful even today where we can pass text strings as well parametric values.
So give it a try and let me know what you think.
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Attributes in assembly - dependent one from another
In order not to digress from this post I may start another.
So watch this space for "Wavelinking - The baby's going with the bathwater"
Jon S
Medical Design Engineer - Glos. UK
NX 6.0.4.3 / TCE V10.0.3.8.6