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!

Show weight of models (parts or assemblies) on drawing documents

Status
Not open for further replies.

rgrayclamps

Mechanical
Aug 6, 2004
376
0
0
US
I need to show weight of models in my drawing documents. They can be part models or assemblies models. I know I can put the following property in my sheet format to show part weight in a part drawing:

"SW-Mass@$PRP:"SW-File Name".SLDPRT"

I also know that I can put the following property in my sheet format to show assembly weight in an assembly drawing:

"SW-Mass@$PRP:"SW-File Name".SLDASM"

My problem is that I use same sheet format for both part drawing and assembly drawing. How do I show weight of models on my drawing without knowing whether the model in the drawing is part model or assembly model. I know I show weight of models through weight custom property of parts and assemblies. But is there a way that I can show weight without using weight custom property?

Thanks,

Alex
 
Replies continue below

Recommended for you

The apparent ambiguity is resolved with sheet property specification of the model in focus (see listbox, lower lefthand corner of SHEET PROPERTIES dialog with heading 'Use custom property values from model shown in:').

allowing the Note specification: 'Weight: $PRPSHEET:"Weight"'. See 'Link to Property' HELP article for complete explanation.

This approach yields Weight for either Part or Assembly.
 
Hi, ralank44:

Thanks for your quick reply. But this approach requires that "weight" custom property be created for every part and assembly model.

We have thousands of models. It is not practical to go through all of them to add "weight" custom property. Or, is adding "weight" custom property to part or assembly necessary?

Is there a better way to display SW-Mass in drawing sheet formats shared by both part and assembly drawings?

Thanks,

Alex
 
Hi, ralank44:

No, I do not need to create the field in all of my drawing. This info (weight) is in drawing sheet formats. I can just reload sheet formats.

Thanks,

Alex
 
adding mass property to BOM
thread559-169912

With Propa-Gator, you can propagate properties to SW documents. You can also switch sheet formats to one which has the correct property link.
The free version will only handle 5 documents at a time, but the paid-for version does not have that limit.

[cheers]
 
Hi, CorBlimeyLimey:

Thanks. But adding mass property to BOM does not help me. We would like to show weight of a part or an assembly model on drawing through sheet formats.

Alex
 
Hi, CorBlimeyLimey:

I have weight information already as follows:

"SW-Mass@$PRP:"SW-File Name".SLDPRT"

or

"SW-Mass@$PRP:"SW-File Name".SLDASM"

My problem is how do I show them on drawing title block via SW sheet formats. How do sheet formats know if a drawing contains views of part model or assembly model?

Thanks,

Alex


Thanks,
 
The link between an annotation on a drawing (sheet format) and a model property is not "gender" specific. (part vs assy).
It simply links the "Weight" property of a document to the annotation.

[cheers]
 
Hi, CorBlimeyLimey:

I am trying to link an annotation on a drawing (sheet format) to SW system-defined property not a custom property (weight) of the document.

Is there a way to link an annotation on a drawing (sheet format) to one of the following two system-defined properties?

"SW-Mass@$PRP:"SW-File Name".SLDPRT"

"SW-Mass@$PRP:"SW-File Name".SLDASM"

Thanks,

Alex
 
No and that will not give you what you want anyway.

1) When you are creating the annotation to link, click on the Link to Property icon (the chain-link with the hand).
2) Select the Model in view specified in sheet properties option.
3) Click on the chevron to access the drop-down list of properties available and select Weight.
4) Click OK and close the annotation.

The weight/mass should now be visible in the annotation.

If the Weight property does not exist in the part/assy it will need to be added first using Propa-Gator or something similar.

[cheers]
 
One problem with what you're trying to do. The exprOne problem with what you're trying to do. The expression:

$PRP:"SW-File Name"

evaluates to the name of the drawing document, not the referenced model. Therefore, this only works if the referenced model file name (w/o extension) is the same as the name of the drawing file. For example, if "Part1.SLDPRT" is a part file and you make a drawing of it and save it with any other name ("Part1A.SLDDRW", "DwgOfPart1.SLDDRW", etc) the link will not work. At the very least, you should change to

"SW-Mass@$PRPSHEET:"SW-File Name".SLDPRT" (and .SLDASM).

$PRPSHEET:"SW-File Name" will return the name of the file referenced by the drawing rather than the name of the drawing file.

What you're doing is a sort of "nested" evaluation which, while it appears to work, I think is sort-of undocumented and unsupported. I think you've pretty much got two options here. One would be to add a "WEIGHT" custom property to all your parts and assemblies. This is what has already been suggested by pretty much everyone who's already posted. Then your drawing note will be:

$PRPSHEET:"WEIGHT"

This would probably be my preferred direction. If you have some programming skills it would be easy to write a macro in Excel, VBScript, using DSOFILE.DLL (google it) to do this for all your existing files. Or, as CBL mentioned, PropaGator can do it with no requirement for programming experience. That property can also be added to your part/assembly templates so that all future documents will have it.

The other option would be to have two different sheet formats, one for parts and one for assemblies. ession:

$PRP:"SW-File Name"

evaluates to the name of the drawing document, not the referenced model. Therefore, this only works if
 
Sorry about the slightly garbled post. Not sure how that happened. Ignore everything before and including "The expr", and also "ession:" and beyond at the end.
 
Hi, Handleman:

I think adding weight custom property is not the best way to show weight on drawing. SW has a system-defined property already for SW-Mass. Drawings should the weight based on the system-defined property (SW-Mass).

Just as you mentioned, I can use two sets of sheet formats using the following properties:

"SW-Mass@$PRPSHEET:"SW-File Name".SLDPRT"

"SW-Mass@$PRPSHEET:"SW-File Name".SLDASM"

The only problem is that I have to maintain two set of sheet formats.

You are right that $PRP:"SW-File Name" evaluates to the name of the drawing document, not the referenced model. So, I should use $PRPSHEET rather than $PRP. I create one drawing for each and every part and assembly. Drawings have same file names as the models.

Thanks,

Alex
 
You are right - there is a system-defined property for SW-Mass. However, it's not available directly to drawings other than by the "nesting" method you currently use. The preferred method is to create a custom property in the part/assembly document that is linked to its system-defined property SW-Mass. The value still comes directly from SolidWorks' system calculation of mass, and it still updates dynamically. It just "un-nests" the operation.
 
Status
Not open for further replies.
Back
Top