Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Part-Drawing Custom Properties Co-relation

Status
Not open for further replies.

dogarila

Mechanical
Oct 28, 2001
594
Hi All,

I am quite knew to SW and using VB to customize it. I adapted a program I found on the internet to create and fill in some custom properties for a part and then I linked them with notes in the title block to automatically update those notes.

Some of these notes are strictly related to the part and I store them in custom properties in the part, like material, weight, name, heat treatment, finish etc. (actually I should store them in properties of configurations, something which is on my list of "to do" things). Some of the notes in the title block are related to the drawing itself and I store yhem in custom properties of the drawing, like drawing date, drawn by, etc.

I would like now to be able to use a macro or a program to be able to read the custom properties from the part while I am in the related drawing, to show them up as read-only text boxes on the form I use to update the properties of the drawing.

About configurations, how do I retrieve the name of the current configuration of a part to know where to save the configuration custom properties values?
 
Replies continue below

Recommended for you

netshop21,

Send me your e-mail address. I have a gift for you. I've all ready done this exact same thing that you having to go through now. I have one program that deals with parts and assemblies, the a second program that works in the draft.

The draft program pulls information from the part/assembly, such as revision information and where used. You may not be able to use all of it, but you shoud at least get some hints on how to.
Don Shoebridge
Sr. Product Developement Engineer
 
Can you help me Netshop1 and 3DDon.
I need to do exactly what Netshop is saying. I need to relate custom properties of parts and assemblies to my drawing tittle block, so when I do a change to the properties the drawing updates automaticaly with the new information.
Can you tell us how to do that?
Thanks
 
Esteva,

I'll tell you the normal dirty way of doing it. It's also in SolidWorks help, but I find that help isn't much help sometimes.

1) Deside which fields in your title block you need to fill with living information, such as names, dates, descriptions, material, etc. But not revision information. That is a completly different animal.

2) Create your title block. Make sure that you put it in the back ground. To do this, right click on the sheet somewhere that is empty and click on "Edit Sheet Format".

3) In the fields that you have noted in the first step, add notes in the correct location.

4) Lets assume that you have a field for a part number. Right click on that note and click on "Properties".

5) In the Note Text window at the top of the dialog, you will want to have the following text $PRPSHEET:"PartNumber" DO NOT CLOSE THE DIALOG BOX! There are a few other things that I want to tell you.

Between the quote marks, you can have any field name that you want. To fill this field automatically with text from the part or assembly, you must have a custom property (configuration specific) with the exact same name in the part or assembly.

6) If you already have the custom property in the part/assembly file, then you can pull it in, or link to if you will, by clicking on the icon on the far right of the dialog, the lower one without the earth in the background.

7) Make sure that the "External model reference" box is checked.

8) If you already have the custom property created in your part/assembly, it will show up in the pull down. Simply select the property, and click Ok. You'll notice that a $PRP string with the custom property name has been placed in the Note text window. Click Ok again. Repeat steps 6 through 8 for each field.

9) Right click in the middle of the sheet somewhere and click "Edit Sheet". This will bring you back to the drawing foreground.

10) In the File menu, save the draft as a template and also click "Save Sheet Format" and save the file somewhere. Now when you start a new draft, the new title block will come up. When you drop your part/assembly onto the sheet, the title block will fill in automatically.

Important note: Avoid using property names with spaces. Reason - if you want to have a custom BOM and you want to include custom property information from the part/assembly, such as "Heat Treat", you have to create a custom BOM template file using Excel, and Excel will not accept spaces in the property name when you are trying to link to your custom properties. So "Heat Treat" becomes "HeatTreat". This way you can link your title block and your BOM's using the same properties, if you want.

Does this help?
Don Shoebridge
Sr. Product Developement Engineer
 
Hi Don,
Thank you, I can't wait to see your gift :).
Here's my email address: andrew@netshop21.com.

Andrew (Netshop21)
 
Don:

Thank you very much, it worked. But only for files that only have one configuration. What I want to do is the following:
For example if have a file for a 2" diameter rod with several configurations for diferent length values.And I want to include them in the drawing as a table like this:

Config. Name Description Material

Configuration_1 Rod 2"Diam X 3" Steel
Configuration_2 Rod 2"Diam X 4" SSteel

The description and material should be properties for each configuration.
I tried this with a design table, but the size in the drawing, and positioning is unpredictable; every time I regenerate the drawing, it change size and position (I want the family table in the same place of my drawing template). And the font size is not tha same as in the desig table in the part.
Is there any way to make a BOM for configurations??
I will appreciate your help, I really need to automate this to make less work.
Thanks

Milton Esteva
Mechanical Engineer
esteva@hotmail.com
from Monterrey, Mexico
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor