Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Attribute annotations - title block values 6

Status
Not open for further replies.

Simon205

Mechanical
Mar 17, 2005
151
0
0
GB
Hi,

I know questions around this have been asked a million times before, and I've searched loads of old threads but can't seem to find a solution to this:

I'm setting up drawing templates with title blocks etc...
We use the master model method (i.e. separate drawing and part files.) I want to get to the stage where; with a model file open, a user can click file>new then select the right drawing template and the fields in the title block will be auto-populated with attributes from the PART file (which was open).

So far I've got the stage where I can get the part filename though to the drawing (i.e. using <W@$SH_MASTER_PART_NAME> ) but I can't get any other information (from file>properties>attributes in the part file) to filter through.

Any ideas?

Apologies if this has been eluded to in a previous thread, but any help appreciated.

Thanks,


Simon
 
Replies continue below

Recommended for you

From other thread I assume there to be these options (starting at NX5?)

<W@$SH_SHEET_NUMBER>
<W@$SH_NUMBER_OF_SHEETS>
<W@$SH_SHEET_SCALE_NUMERATOR>
<W@$SH_SHEET_SCALE_DENOMINATOR>
<W@$SH_SHEET_SIZE>
<W@$SH_SHEET_UNITS>
<W@$SH_SHEET_PROJECTION_ANGLE>
<W@$SH_MASTER_PART_NAME>
<W@$SH_PART_NAME>

The date is somewhat more elaborate:

In de expression editor (in modeling -> Ctrl-E) create the following expressions (all type string):

MyDate = StringUpper(dateTimeString("localTime?", True))
MyDay = subString(MyDate, 9, 10)
MyMonth = subString(MyDate, 5, 7)
MyYear = subString(MyDate, 21, 25)
MyTimeStamp = MyDay + " " + MyMonth + " " + MyYear

Then in Drafting pasted this text into a note: <X0@MyTimeStamp>

(update date in Modeling with Tools -> Update -> Update for External Change)

 
Thanks for the reply, though does this mean to say that you cannot bring in custom attributes set by the user (like colour, finish etc...) from the part file?
 
I'm struggling with title blocks myself. I think this is possible, because the title blocks at my company update e.g. the material in the title block automatically. But I'm not yet advanced enough to know how this is done. Sorry
 
OK, Part Attributes get transferred automatically to the Assembly Component as Object Attributes and you can create notes linked to either Part or Object Attributes using the 'Reference' option in the Annotation Editor.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Thanks for the reply. I understand this, but in my drawing template file, when I add text and select: Text Editor>Relationships>Object Attribute, the 'Target Object' box appears and I'm unsure what to enter here.

If I were in an already-created drawing of a part (master model) I'd select the part name in the assembly navigator, but as this is a template I'm trying to create, there's no part model to select. Have I explained this clearly?

Thanks,


Simon
 
Thanks, but firstly, there's no object in the drawing to select (because it's just a template file).

Secondly, selecting Part Attribute as a relation in the template file only brings through the template's properties (Attributes),not the part that the drawing will be displaying.
 
I'm having the same kind of problem. I think the solution is to only have the attribute defined in the model template ie MATERIAL then make sure the Drawing template does not have the MATERIAL attribute defined. Now when you create a drawing using the drawing template the MATERIAL attribute should be automatically created in the drawing file with a value linked to the model file.

We seem to have both the MATERIAL attribute defined in the model template and the drawing template and are having the problem of the drawing MATERIAL attribute not updating to the same value as the model MATERIAL attribute. I will be trying tommorrow to remove the MATERIAL attribute from the drawing template file to see if this works.
 
OK, here is what you do.

Before you create your Drawing template, create a 'dummy' Part file which we will use to represent a typical piece part model. Now the solid body that you place in this 'dummy' file can be anything including something as simple as a 'block' primitive. Now in this file create all of your standard Part Attributes that you will need. You can leave the values blank or just place some text as place-holders. Now save the file.

OK, now create your drawing template file using the 'dummy' part you just created as the master part model for the drawing. If the file only contained a block, that's fine, you'll now have a 'drawing' of a 'block'. Go ahead and define the views that you wish in your drawing template (I've got several templates of different sizes with different predefined view layouts such as 2, 3, and 4 - view layouts). Now with this simple 'drawing' in front of you go ahead and add the notes that you need in your template using the 'Relationship' option, 'Object Attributes', selecting the 'component' of the master part model as the 'object' (make sure you select the component and not the body). When you do this you will get a list of Object Attributes (which were the Part Attributes created in the 'dummy' part file) and just select and include in your template annotation the attribute references that you wish.

Now save and close all the open files.

Now open one of your actual piece parts, making sure that you've populated the Part Attributes with the data that you need. Now with this file open, apply your new drawing template. What happens is that your template will be looking for the 'dummy' component that was there when you saved it, but instead it will find your actual part file, which will replace the 'dummy' file it was expecting, and all of the attribute assignments will also be replaced and your drawing annotations which were linked to the attributes of that 'dummy' part will now be linked to your actual part file attributes.

So give that a try. It requires a little bit more prep-work up-front, but once you've got things set up, it should work exactly as you need it to.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Well John, I never would've guessed to try that (I would've presumed that your drawing template would then bring 'dummy' part with it when going File>New) but that's worked perfectly!

A thousand thank-yous, or a star - I've opted for the star.

Pretty long-winded, but it works - and just one question; surely this is something that loads of people come across - could I have found this in the help documentation anywhere?

Thanks again,


Simon
 
In all honesty, I've never really looked. When you 'grow-up' with the software as I've done (31 years of usage as of this past July) many things become second nature and you don't think much about it until some asks you "How did you do that?"

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.
Back
Top