Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Automate Drawing Description

Status
Not open for further replies.

pdybeck

Mechanical
May 14, 2003
599
I would like to be able to drag a model into a drawing file and have the description on the model's file properties be automatically entered on the drawing's file property description. This would save some time (data re-entry). I tried to set up drawing templates the drawing's custom file property description to use $PRPSHEET:"Description" so that it would pull that info from the model and display it as the drawing's description, however this did not work. Does anyone know how to achieve what I am trying to do? I'm basically just trying to pass the model description to the drawing description, so that this doesn't have to be re-typed. I know I could create a macro, just trying to see if I could set a method up on the template to automate this. Any help would be greatly appreciated.

Pete Yodis
 
Replies continue below

Recommended for you

This is what you need to do:

1) Start a part and save it with the Custom property "Description"
2) Drag it into one of your Standard Drawing sheets that you want to add this property too.
3) RMB "Edit the Sheet Format"
4) Add a note
5) Click the Middle Icon under the "Text Format" Menu.
6) Click on "Model in view Specific in Sheet Properpties"
7) Click the Down arrow and pick "Description" from the menu.
8) Click OK
9) The name will automatically be added to your sheet
10) Click OK
11) RMB and select "Edit Sheet"
12) Now Delete the part from the sheet and Save your sheet as your new template.

Yes when you delete the part the description disappears, but if you add another part with that same custom property the Note will automatically populate.

Just typing $PRPSHEET:{Description} will not link the two together.

I hope that helps!

Regards,

Scott Baugh, CSWP [bdaycandle] to me

If your in the SW Forum Check out the FAQ section

To make the Best of Eng-Tips Forums FAQ731-376
 
Scott,

It seems I wasn't clear enough. I don't want to add a note, I want to add the model's custom property for description to the drawing's custom property for description so that users don't have to re-key the same information that is on the model. I want PDM/Works users to be able to search drawings based on their descriptions. In order to do that, the information needs to be entered on the custom file property for description, not just a note on the drawing. I don't want people re-typing info on the drawings file properties, I want to borrow the information from the model's custom properties. I can't seem to do that except for maybe a macr that can be executed on a drawing to the copy the model's description to the drawing's description. Hopefully I am making sense.

Pete

 
You want to link a custom property that was added to a model, to another custom property in the drawing. I don't think there is a cut and dry method of doing this without using some API macro or app.

Regards,

Scott Baugh, CSWP [bdaycandle] to me

If you are in the SW Forum Check out the FAQ section

To make the Best of Eng-Tips Forums FAQ731-376
 
That's what I thought. Thanks though...
 
Here is what we do, it won't quite work for you PDM stuff though. When we create a part we add a design table. We work with sheet metal alot so with a Macro in EXCEL we generate a form that allows us to fill out the part number and description. This information is then entered in the design table creating two configurations. One is a flat derrived from the other. When we drop the part into a drawing the part specific information is already there. I don't know if that could be incorporated in searches with PDM or anything, but it is automatic as it gets for us. You will always have to enter the information at least one time no matter how you do it.
 
Scott,
I've been doing this for quite sometime now and works great. The problem I have is that when I save the drawing document, I have to re-type the description in the drawing filename. In other words.......It seems that SWpart decryption has no associativity with the SWdrawing.
 
Scott,
Disregard my question because it was already answered. It was the same one as pdybeck's asked.

Have a good weedend fellas!
 
pdybeck:

I have been doing just what you tried for three years now:
part property
•name :"Desc"
drawing property
•name: "Desc"
•value: $PRPSHEET:"Desc"

This works fine.

Remember that property names are case sensitive.

[bat]Due to illness, the part of The Tick will be played by... The Tick.[bat]
 
TheTick,
Does this change part and drawing description across the board?

macduff
 
Hi

Maybe you can try DSOfile. DSOfile will provide the API to access file properties and change them. So, in simple words, you can meke a macro which is able to copy a certain part custom property and copy it to a file (any windows file, inluding SW drawing files) property that can be accessed directly by Windows Explorer (without opening the file).

Regards
 
Yes this can be done. Here is the portion of the code from the routine that I developed for custom properties at my company. Description and ReferencedModelName are strings, swView and Doc are objects, longVal is long. You can add this code into a vba form and tie it to the form's activate event. I check for document type first and then only run this routine if the document is a drawing.


If Description = "" Then
Set swView = Doc.GetFirstView
Set swView = swView.GetNextView

ReferencedModelName = swView.GetReferencedModelName
ReferencedModelName = LCase(ReferencedModelName)

Set ReferencedModel = swApp.ActivateDoc2(ReferencedModelName, False, longVal)

If ReferencedModel Is Nothing Then
MsgBox "Error loading referenced model!"
Exit Sub
End If

Description = ReferencedModel.CustomInfo2("", "Description")

Set Doc = swApp.ActivateDoc2(Doc.GetTitle, False, longVal)
swApp.CloseDoc ReferencedModelName

End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor