Automate Drawing Description
Automate Drawing Description
(OP)
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
Pete Yodis






RE: Automate Drawing Description
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
to me
http://www.3dvisiontech.com
http://www.scottjbaugh.com
If your in the SW Forum Check out the FAQ section
To make the Best of Eng-Tips Forums FAQ731-376
RE: Automate Drawing Description
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
RE: Automate Drawing Description
Regards,
Scott Baugh, CSWP
to me
http://www.3dvisiontech.com
http://www.scottjbaugh.com
If you are in the SW Forum Check out the FAQ section
To make the Best of Eng-Tips Forums FAQ731-376
RE: Automate Drawing Description
RE: Automate Drawing Description
Thanks,
Scott Baugh, CSWP
to me
http://www.3dvisiontech.com
http://www.scottjbaugh.com
If you are in the SW Forum Check out the FAQ section
To make the Best of Eng-Tips Forums FAQ731-376
RE: Automate Drawing Description
RE: Automate Drawing Description
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.
RE: Automate Drawing Description
Disregard my question because it was already answered. It was the same one as pdybeck's asked.
Have a good weedend fellas!
RE: Automate Drawing Description
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.
http://www.EsoxRepublic.com
RE: Automate Drawing Description
Does this change part and drawing description across the board?
macduff
RE: Automate Drawing Description
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
RE: Automate Drawing Description
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