attribute from part of "part name"
attribute from part of "part name"
(OP)
I need to have my own "callout" that is a part of the "name part"
com0000_000_P001_EXAMPLE.PRT
i need to create a attribute MYCALLOUT= 001
inside the part for all the part of the assembly.
i find this thread but i don't know how modify this.
thread561-365279: Refile and add attribute
thread561-316998: NX 6 ASSIGNING FIND NUMBER ATTRIBUTE AT DRAWING LEVEL
I need to do that to create some exploded view of some subassembly
without lose a univocal "callout"
com0000_000_P001_EXAMPLE.PRT
i need to create a attribute MYCALLOUT= 001
inside the part for all the part of the assembly.
i find this thread but i don't know how modify this.
thread561-365279: Refile and add attribute
thread561-316998: NX 6 ASSIGNING FIND NUMBER ATTRIBUTE AT DRAWING LEVEL
I need to do that to create some exploded view of some subassembly
without lose a univocal "callout"
NX 7.5 64bit
NX 9.0.3.4 MP4 64bit
www.studiotreccani.com





RE: attribute from part of "part name"
com0000_000_P001_EXAMPLE.PRT
Is the callout location consistent within the part name? From your example, I'd guess it starts after "_P" and ends at the next "_". Is this always the case?
I see you have NX 7.5 and 9 listed in your signature, which version will this code be run on?
www.nxjournaling.com
RE: attribute from part of "part name"
1)To be clear, when after the command i will open the single "component/part"(example a "...screw.prt")
I'll need to see MYCALLOUT, so to see the univoque callout at every level of the
assembly (and decide later where to create the explode view)
2)Yes is always the case, keep in mind that a case of name could be COM0000_000_P001_PLATE.PRT
3)The best is both but if is not possible NX9
Thank in advance.
NX 7.5 64bit
NX 9.0.3.4 MP4 64bit
www.studiotreccani.com
RE: attribute from part of "part name"
- get the name of the current work part
- split the name at the underscore character
- get the third section of the part name
- remove the first character of the resulting string
In the picture below, I created 4 expressions and named them so they would show up in order. The names can be whatever you want; you could even combine them into a single (large) expression. If the part name changes, you will have to use "update for external change" to update the expressions (they won't update automatically).Once you have the callout as an expression, you can create a callout attribute and link to this value. If you use the parts list command, you can set it up to use your attribute for the callout instead of the default value.
www.nxjournaling.com