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"""
No I tried to access to the Part, from its drw.
Set swDrw = swModelDrwSet swView = swDrw.GetFirstViewSet swView = swView.GetNextView
modelPath = swView.GetReferencedModelName 'Full path & file extensionSet swModelPart = swApp.OpenDoc6(modelPath, swDocPART, swOpenDocOptions_Silent, "", longstatus, longwarnings)
Set swPart = swModelPart
I've managed with this code.
I'm not sure I understand your question.
If you want to insert a part custom property in a drawing note use : $PRPSHEET:"Description"
obviously a note linked to a specific view will not work. Are you trying to pull that down into your title block?
If I understand you correctly, you already solved the issue with a macro.
If that is the case, can you mark the thread as solved? That will make it clear for us that we don't need to do any more actions to help you.
Marcos Farina wrote: Set swModelPart = swApp.OpenDoc6(modelPath, swDocPART, swOpenDocOptions_Silent, "", longstatus, longwarnings)Set swPart = swModelPart
Marcos Farina wrote:
Set swModelPart = swApp.OpenDoc6(modelPath, swDocPART, swOpenDocOptions_Silent, "", longstatus, longwarnings)
If you're looking to get the model properties from drawing then you do not need to open that model.
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.)
Retrieving data ...