×
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

SW 05/Attribute transfer from Part to Drawing???

SW 05/Attribute transfer from Part to Drawing???

SW 05/Attribute transfer from Part to Drawing???

(OP)
I am trying to populate & transfer the attributes from my part to its associated drawing file for final mapping & eventual use in a PLM/PDM vault application that will simply read data from one file.  In short, you usually fill out these attributes after creating a part, by accessing File-Properties-Custom tab, selecting or creating your Property Name prompts(tags) & then populating your list values as necessary.  Is there any way to carry these same Tags & Values from the part-assy file over to its drawing file without having to recreate the wheel & raise the potential for errors?  Also by chance, while in the same Custom tab dialog box & after creating a Custom Property tag, would anyone out there know how to enter a Value/text expression as a Drop Down choice with the type set to text?

I'll buy you a beer, maybe a couple for both answers.

Mark

RE: SW 05/Attribute transfer from Part to Drawing???

Do you know which PLM/PDM vault application you will be using?  Some can do this automatically as the files are loaded into the system.

Otherwise, I do believe there are some macros floating around somewhere that can do this.

RE: SW 05/Attribute transfer from Part to Drawing???

In SW they are called properties not attributes.  
thread559-125139

Flores
SW06 SP3.0

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Allright Let's just forget about the PDM/PLM side of it.  How do you transfer the File-Properties-Summary Info-Custom Props(attributes) from the part to its assoc drawing file?  I'm trying to enter this custom data one time & one time only.

This data is aka metadata & attributes in most PDM/PLM software.

RE: SW 05/Attribute transfer from Part to Drawing???

In the SW Help Index, go to drawing sheets, customizing sheet formats

It is explained there, in detail.

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Thanks for the info.  I've seen the sheet format help before & not to sure if it all applies to my issue of property migration from part to dwg.


What about setting up drop down choices for the Value-Text expression in the Custom Properties area?

RE: SW 05/Attribute transfer from Part to Drawing???

If you use a custom properties macro - like the ones in the thread smcadman referenced - and know a little VB, adding the drop down list would be easy.

I do not know how to do it without a macro

RE: SW 05/Attribute transfer from Part to Drawing???

I'm not sure if your new to Solidworks, but I know your new here to this forum.  A little work will be required on your part.  If you do a search in SW Help for "customizing sheet formats" exactly like CorBlimeyLimey posted, AND read the first topic that came up, you would have your answer.  

Flores
SW06 SP3.0

You can lead a horse to water, but you can’t make him drink.

RE: SW 05/Attribute transfer from Part to Drawing???

See also Solidworks Custom Properties in Templates  thread559-141106

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

<http://www.esoxrepublic.com/freeware>
Copy Custom Info macro.

Also...
  1. Say "Widget.sldprt" has property named "Prop1", assigned value "Shizzle".
  2. You want a property in "Widget.slddrw" to also have a property named "Prop1" that matches value in "Widget.sldprt".
  3. Create a property in "Widget.slddrw", assign it the value $PRPSHEET:"Prop1" (case sensitive, quotes and colon necessary, Name in quotes matches name of property in model used in default view)

I could be the world's greatest underachiever, if I could just learn to apply myself.
http://www.EsoxRepublic.com-SolidWorks API VB programming help

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Doing just what you said while editing the Sheet Format is no problem, but while in the Custom Properties dialog of a drawing & assigning $PRPSHEET:"Prop1" to the Value/Text-Expression field, I only get just what was typed ($PRPSHEET:"Prop1), no further evaluation that would demonstrate the link to the model itself.  What am I missing here?

RE: SW 05/Attribute transfer from Part to Drawing???

OK, step by step:-

1) Open a new drawing document.
2) Insert a view of a part.
3) RMB click anywhere in the document, but NOT in the parts view & select Edit Sheet Format.
4) Click on the Note icon in the Annotations toolbar (or Insert > Annotations > Note) & place it on the sheet. Do not type anything.
5) Click the Link to property icon in the Note Manager. It's the one with the hand & chain links.
6) In the new options box which opens, select Model in view specified in sheet properties.
7) Click the chevron to display all the available properties for the part.
8) Select the custom property you want to link to the note & click OK.
9) Click the green check mark or hit the Enter key. The note should now display the property from the part.
10) RMB click anywhere in the sheet & select Edit Sheet
11) Click File > Save Sheet Format, browse to where the Tools > Options > File Locations > Sheet Formats points to, type a file name & click Save.
12) Close the document you have open without saving.

Now when you open a new drawing document, you will be able to select the Sheet Format you just created, & when you insert a part view onto it, the property will automagically be populated.

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
I know how to do the very procedure you are describing with the Sheet Format.  The issue I have is with the Custom Properties & migrating the properties for the part to its associated drawing.  The very links you are describing while applying annotations to the sheet format  using $PRP & $PRPSHEET are not working while in the File-Properties-Custom tab.  My values are not being evaluated properly in the Value-text expression field of the Custom tab, even when using the format $PRPSHEET:"Property Name" in the above mentioned field. My sheet format is fine; I just want to carry the properties from the model to its drawing without having to retype them in the Custom Properties dialog.  Something fairly simple is not being done to establish this connection either by formatting or my understanding.  Thanks for your replies ntl.

Mark H
mech engr

RE: SW 05/Attribute transfer from Part to Drawing???

Does you model have configurations?
Try entering the properties in the Configuration Specific section.

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

Few questions first.

1. Were you atleast able to link and display value of some Custom Properties or were you not able to display the value of any of the Custom Properties?

2. Exactly what are you trying to link? Are the properties listed anyway related to Revision Table?

Regards

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
I can link with $PRP: & $PRPSHEET: while using annotations in the sheet format, no problem there, but the $PRPSHEET:"property" does not evaluate to the correct assigned value when placed in the Value-Text Expression area of the Custom Properties dialog box for the part or drawing file.  My only existing configurations are just the default & I'm running SW 05.  Perhaps I am doing something wrong in the Custom Props dialog or some other setting is to blame.  I simply want to transfer those assigned custom props from my model to its assoc drawing file.  No problem with the sheet format & related links at all.  Thanks for the comments

Mark
mech engr

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
I'm trying to eliminate the need to have the fellas in this engineering dept retype-recreate the Custom Properties in the drawing file after they have been done in the model or assy.  The values are eventually utilized by our PDM-PLM manager(Product Center) as attributes & checked into the vault area.  Just attempting to prevent double work & errors.  Also, I would like to have a drop down show up in the Value-text expression area of the Custom Props dialog that I could assign custom values from a list for a given Property Name.  Any takers?

Thx

Mark

RE: SW 05/Attribute transfer from Part to Drawing???

Quote:

My values are not being evaluated properly in the Value-text expression field of the Custom tab, even when using the format $PRPSHEET:"Property Name" in the above mentioned field.
What exactly  did you type in the Value/Text Expression field?

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

Criminey, youse guys!

The man wants to copy the cutom properties in the part/assy file to the custom properties of the drawing file! He has explained several times that he knows how to get the custom properties in the part/assy file to populate on the face of the drawing. That isn't his question. He wants to copy the information that will show up in the PDM tree, i.e.  the Custom Properties from the File heading in the pull down menu. (I think--I have been wrong on occasion.blush )

Having said that, I think it was answered in the 3rd post. The caveat was "if you know a little VB." I don't, so I've never been able to figure out those macros. Markhp48 may be in the same boat.

RE: SW 05/Attribute transfer from Part to Drawing???

I agree with wgchere. we had the same problem withour PDM system. We fill the custom properties in the part/assy (eg part number), and this needs to get into the PDM system, via the drawing. We paid someone to do a Solidworks add-in. It just copies the data from the part to the drawing whenever the drawing is opened (or created).

RE: SW 05/Attribute transfer from Part to Drawing???

I have also tried to do exactly what he is saying (copy part/assembly properties to the drawing custom properties. The reason I wanted this was so that the properties were visible by using windows explorer.
However I believe the only way to do this is by using a macro feature so that when the drawing is rebuilt the properties of the part/assembly are read and then copied to the drawing properties. I haven't seen a macro yet that does this, but it should be possible.

ta

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
I typed $PRPSHEET:"Description" in the Value/Text Expression field while in the drawing to attempt to transfer that property from the model itself.  It simply evaluates to just $PRPSHEET:"Description" & not to the value assigned while in the model-part Custom Properties.  Of course the above procedure works nicely for annotations placed on the drawing or in the sheet format.  What are my alternatives?

RE: SW 05/Attribute transfer from Part to Drawing???

The $PRPSHEET: thing seems to have changed.  It used to evaluate in the property editor.  It does still evaluate if you use that property in a note in the drawing.

strange

RE: SW 05/Attribute transfer from Part to Drawing???

markhp48 ... OK, thats what I was suspecting. What you are seeing is exactly what should happen. In the Value/Text Dexcription field you need to type the actual description that you wish to see in the linked notes. ie; if the description should be "Left Handed Widget", then type in Left Handed Widget. The linked note in the drawing is reporting exactly what you have input into the Property field.

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

wgchere, rmars ... Re-read the posts. Getting the properties into a PDM system is  his ultimate goal, but he has been unable to get the properties to show correctly in the drawings.

cheers
Helpful SW websites  FAQ559-520
How to get answers to your SW questions  FAQ559-1091

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
A lot of good advice, but I'm essentially where I started.  Now for a slightly related question, how do I create custom Drop Downs(choice lists) for the Value-Text Expression of the Custom Properties while in a SW drawing?  I need to have a custom list of drop downs available for a custom property in the Custom Props dialog box in a drawing.  I'm not so sure we can migrate(link) Custom Props & Values from the model to drawing in the Custom Props dialog for eventual attribute transfer in to my PDM app.  I know how to link  annotations on the drawing.  That is not the issue.  It's Friday & Thanks for your help.

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Any other suggestions out there on custom prop migration(values included) from part to drawing within the Custom Props dialog only?  Otherwise, I will have to tell this engr office that it cannot be done & they will have to populate each files' custom properties individually before loading into the vault area of our PDM.

Thx

Mark H
mech engr
FPI

RE: SW 05/Attribute transfer from Part to Drawing???

As far as I know, there is no way of linking a drawing’s property to a model’s property.  That said, one can create a macro / VB program to copy the properties from a model into a drawing.  I have written one which does this for the description and number properties.  If you would like to attempt to modify it to suit your needs, I can post a link to it.

You can’t add a dropdown to the file -> properties page either.  However a macro / VB program with dropdowns can be created.  PropertyEditorSpec, which can be found at: http://webpages.charter.net/mkikstra/SolidWorks.html, may do most if not all of what you are looking for.  It is what I used as a reference when I made the app to copy the properties over.

Eric

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Eric-Thanks I'll check out your suggestion.

Mark

RE: SW 05/Attribute transfer from Part to Drawing???

At no point in this discussion was it clear to me that anyone pointed out that the model property does not transfer to the drawing field unless the drawing and the model are both open. Or did I miss that part?

--
Hardie "Crashj" Johnson
SW 2005 SP 4.0 (reluctant to change)
Matrox Millenium G550
AMD Athalon 1.8 GHz 512 Meg RAM

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
They do not transfer from within the Custom Props from my understanding.  They are to be entered seperately-a pain.  One set of data should apply to the part & its assoc drawing, since I want our PDM-valult system to use just one set of attributes for simplicity.  Now I've got to figure out how to use one of the macros that Eric suggested.  Onward.

RE: SW 05/Attribute transfer from Part to Drawing???

The links to your properties (from the model) on your drawing should contain the $PRP: (not the $PRPSHEET:), which was explained on an eariler reply (checking bullet "model view specified in sheet properties" when selecting the link property.

Examples:

$PRPSHEET:"SW-File Name" = takes info from the drawing properties (in this case, the file name).

$PRP:"SW-File Name" = takes info from the part (model) properties (in this case, the file name).

Summary:

$PRPSHEET: TAKES INFO THAT WAS INPUT TO THE DRAWING
$PRP: TAKES INFOR THAT WAS INPUT TO THE PART (MODEL)


If you do this right, you should not need any properties in the drawing, since everything should be coming from the part (model).

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Correct definitions....$PRP links to properties in the current document whereas $PRPSHEET links to props of the model in the view specified in the sheet properties of the drawing.  No problem with annotation-sheet format links & evaluations.  Now while in a drawing file, try to make evaluations of $PRPSHEET which is pulling link data from the model from within the Custom Properties dialog.  They will not evaluate, therefore problematic.

RE: SW 05/Attribute transfer from Part to Drawing???

OOPS, yes, sorry (I even thought I tried that before I posted).

I'm still trying to understand what you mean by "evaluations". Are you saying that when in a drawing, you select file, properties and expect to see what you had typed in for properties in the part properties?

RE: SW 05/Attribute transfer from Part to Drawing???

I checked again, and I feel I was right the first time. Just "evaluating" $PRP instead of $PRPSHEET. Otherwise, I just can't understand what you are talking about.

RE: SW 05/Attribute transfer from Part to Drawing???

(OP)
Clarification: $PRPSHEET:"value text-expression" will not evaluate at least from my observations while in the Custom Props dialog.  $PRP works fine.

RE: SW 05/Attribute transfer from Part to Drawing???

You may want to to check into an add-in called customworks.  I've played with it a little and I believe it will do most of what you ask.  The app is about $800.

I agree however SW should do more in the way of custom properties.

Rob Rodriguez CSWP
President: Northern
Vermont SolidWorks User Group
www.robrodriguez.com (updated 2/22/06)
SW 2006 SP 3.0

RE: SW 05/Attribute transfer from Part to Drawing???

Simplest way to copy custom properties from part file to drawing file in API is to assume that the drawing has the same name as the part:

-with the part open, create a ModelDoc2 object equal to the part
-use ModelDoc2.GetCustomInfoNames2 to get names of the desired properties
-use GetCustomInfoTypes2 and CustomInfo3 to get types and values (respectively) of the custom properties, using names obtained in the last step
-use ModelDoc2.getPathName to get the save path of the current part model
-use string manipulation to strip SLDPRT or SLDASM from the pathname and replace it with SLDDRW to get the drawing pathname
-use openDoc6 or GetOpenDocumentByName to open the drawing using the above pathname
-delete custom properties of the drawing (retrive names using getCustomInfoNames then use deleteCustomInfo to loop through each property and delete it)
-add custom properties to the drawing using custom property names, values and types obtained from the part above
-save the drawing (AddCustomInfo3)

This can also be done from outside of Solidworks using the windows DSO method, but as far as I can tell DSO will turn all properties to type "text".  You also can't use DSO if the drawing is open in Solidworks.



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