×
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

link custom props to drawings
2

link custom props to drawings

link custom props to drawings

(OP)
How can I link the custom props of parts/assemblies to the custom props of a drawing.
eg part property 'PartNum' link to drawing property 'PartNum'
I know how to display the part/assembly props in a drawing, but I cant see how to then link that data into a drawing property.

RE: link custom props to drawings

Read the Link to property section in the Index of the SW Help.

Helpful SW websites  FAQ559-520
How to get answers FAQ559-1091

RE: link custom props to drawings

I had to read that section several times before it was clear to me, so here’s the benefit of my blood, sweat and tears (and swearing). Note, this is for SW2005, so it may have changed a bit in SW2006.

In your drawing, right-click the note you want to link to the model file property, and select “Properties…” from the pop-up menu (near the bottom). This opens the Properties window.

On the right of the Properties window are 2 icons—select the one that has the hand pointing to a page with a chain link in the lower right. This icon opens the “Link To Property” window.

In the Link To Property window click the “Model in view specified in sheet properties” button. This opens up a list of the properties in your model. Select one and that links the note to that model property.

Note that the list of properties is reading the properties in the model file, so you need to define the properties in the model first.

RE: link custom props to drawings

(OP)
Maybe I am not explaining myself properly.
I already know how to display the models customs properties in a drawing (as shown be the previous answers).
What I would like to do is copy or push that data from the model into a custom property setup in the drawing sheet template.
From what I can see this may need to be done with a macrofeature? Can anyone help us there?
Thanks.

RE: link custom props to drawings

I have done something similar. (I think). With a model in the drawing, link your format entities to all the model properties, then save as a template. The template is now searching for properties in the model, and as soon as a model is linked to the drawing the correct properties will show up.

Did I read you right?

RE: link custom props to drawings

andrewjohns ... perhaps a couple of screen shots would explain more about what you are trying to do.
See FAQ559-1100 or FAQ559-1177.


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

RE: link custom props to drawings

Ok, here's an undocumented trick though I don't know if it buys you anything different than just linking a note directly.  You can create a property in the drawing "My Description" for example. Then put in $PRPSHEET:"Part Description" as the value. Then you can link notes on the drawing to this drawing property which is linked to the part property.

The custom property editor doesn't show the value of the link as you might expect, and I'm not sure there's any value to doing this, but maybe someone can come up with something.

Jason

UG NX2.02.2 on Win2000 SP3
SolidWorks 2005 SP5.0 on WinXP SP2
SolidWorks 2006 SP1.0 on WinXP SP2

RE: link custom props to drawings

There is little value in copying the model properties into drawing properties. That's why people couldn't understand what you wanted. Why would you like to do that?

RE: link custom props to drawings

I can see the value in this, especially when a PDM system is being used.  For example, if you are pulling the drawing number and description fields into the title block from the referenced part/assembly and you do not also have these custom properties in the drawing file, you will not have these properties available when looking at previews of the drawing or when searching through the PDM system.  You will also not see the description show up when you highlight the drawing file in Windows Explorer, nor will you get the description in the windows status bar (both very useful).  In my opinion, it is best to have the description field in both places - part and drawing, which is what is being requested.

The best way to do this is to use a VBA form to enter/modify custom properties instead of using the SWX interface.  This is very thoroughly discussed in the API help and there are numerous free custom properties routines available.  You will need to modify one of these to accomplish what you are after.  Then, you can enter properties as normal in part and assembly files, but when a drawing file is active your routine needs to:
1) get the first drawing view
2) activate the referenced document
3) get the properties you want to transfer and store them in strings
4) return to the drawing document and update/create the corresponding custom properties in the drawing

In this way, model custom properties can drive drawing custom properties without manual retyping.  A macro will do it and is a better solution than a macro feature.

RE: link custom props to drawings

Stoker,

Can you recommend a custom properties download that has a easy-to-use interface for someone inexperienced in API?  I have been trying to accomplish what you have described for awhile.  Haven't spent a whole lot of time on it yet.

Thx

RE: link custom props to drawings

(OP)
Stoker, that is exactly what I am thinking of doing.
We do not have a dedicated PDM so I was thinking of linking the model properties to the drawing's properties, so that they are visible using windows explorer. Also I was thinking of using the data to auto populate the design journal.doc in the drawing file. A limitation I have found with the design journal if used in the model is that it is not configuration specific, and as we use configurations for similar parts then the design journal does not work for us. As each part or config has a seperate drawing file then I think I can get the design journal to work for us.

Seems like some programming is needed.
Thanks everyone for their help.

RE: link custom props to drawings

You may want to look though the links at http://www.markkulehtola.net/solidworks.html .  A couple of custom properties examples with source code can be found at http://webpages.charter.net/mkikstra/SolidWorks.html  and http://www.rhapsodydesignsolutions.com/parameter_input.zip .  Both of these examples do more than just simply enter/edit custom properties - they include extra features and in my opinion are far more complex than most people really need or want them to be.  However, they are written to be generic and they do demonstrate a lot of tools which you may find interesting.  

Unless you have a large number of users, the best solution is a standalone macro with a simple userform, all done in VBA.  Use combo boxes to hold lists that the user can choose from and text boxes for text entry.  When the routine first runs, you can test to see what type of document is open and then enable/disable fields as required to ensure that the correct properties are entered for that document type.  

When the model library was active on the SolidWorks web site there was an excellent example in the API section.  It was a very basic form to enter custom properties without any unnecessary extra features.  This example is no longer available on the SWX site, but maybe you can email API support to see if they still have it.  This would be a far easier starting point to developing your own routine.  You would just have to customize the property names to your standards and add the code to copy the required properties from the part to the drawing file.    

RE: link custom props to drawings

2
Here is a ling to a macro that I wrote a while back for this purpose.
http://home.comcast.net/~ewetemp/SolidWorks/PropertySync.swp

You run it from a drawing and it lets you copy the Number and Description properties between a model within the drawing and the drawing.

Brief instructions:
The dropdown to let you select between different models within the drawing.

The radio button lets you select between interacting with the model’s properties or the specific configuration’s properties.

The arrows transfer the number, description or both between the drawing and the model.

You are welcome to try it.  I do not know how much luck you would have modifying it to interact with the design journal, and unfortunately I have not gone back through and commented the source code.

I found the source code for PropertyEditorSpec at http://webpages.charter.net/mkikstra/SWX-macros.html helpful when writing this macro, and it might be a better starting point for creating your own.

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