Anyone came across this requirement before?
I'd like to get a Part description, from its drawing to add it to a custom property.
Tried this, but doesn't work in properties: "$PRPVIEW:""Description"""
Any hint?
Regards.
Anyone came across this requirement before?
I'd like to get a Part description, from its drawing to add it to a custom property.
Tried this, but doesn't work in properties: "$PRPVIEW:""Description"""
Any hint?
Regards.
No I tried to access to the Part, from its drw.
Set swDrw = swModelDrw
Set swView = swDrw.GetFirstView
Set swView = swView.GetNextView
modelPath = swView.GetReferencedModelName 'Full path & file extension
Set swModelPart = swApp.OpenDoc6(modelPath, swDocPART, swOpenDocOptions_Silent, "", longstatus, longwarnings)
Set swPart = swModelPart
I've managed with this code.
I wrote about the differences between $PRP, $PRPVIEW and others here:
But you are trying to get the part model in the drawing properties. I don't know if the drawing custom properties know anything about the part that is used to create the drawing views. Maybe $PRPSHEET could work.
I then come back to Brian Graves' question: what are you trying to achieve?
If I understand what you are asking correctly (and I may not be) then the answer is 'simple' if not easy. When you save a part/assembly (or 'save as') you have the option of adding a 'description' under the line which shows the extension/type of the file. This 'description' populates the drawing name block in a drawing whilst the 'File name' populates the part number block in a drawing. (I don't particularly like this convention myself but there you have it.)
No I tried to access to the Part, from its drw.
Set swDrw = swModelDrw
Set swView = swDrw.GetFirstView
Set swView = swView.GetNextView
modelPath = swView.GetReferencedModelName 'Full path & file extension
Set swModelPart = swApp.OpenDoc6(modelPath, swDocPART, swOpenDocOptions_Silent, "", longstatus, longwarnings)
Set swPart = swModelPart
I've managed with this code.