Ref drawing

Hello

I'm looking for either the macro or help creating a macro.
We regularly copy pieces from one case to another and not always in a clean way with "Composition to go". If the drawing has been copied with the part and then renamed without giving the reference to the new part, we end up with the new plane that will point to the old part. Beginning of problems
I would like to retrieve the reference of the drawing, to either display it (for control) or to copy it into a text file for manual control. Then I will adapt it to an assembly or backrest.
Do you have any leads?
Thank you.

A+

Hello

If you are looking to make a clean recording, I advise you to download my "save as" tutorial available on Lynkoa:

http://www.lynkoa.com/tutos/3d/macro-enregistrer-sous-avec-solidworks

Otherwise, could you explain a little  more what you want? How do you recover? Show where? From the SolidWorks part or assembly?

1 Like

you just have to add a note in your basemaps with: $PRPSHEET:"SW-File Name"

This will show you the name of the room used in the plan views.

1 Like

Hello

After renaming all your parts as well as the drawings, just open the room and right-click and then select Open Drawing and there the room searches for the drawing with the same name and re-create the link in them.


ouverture_mise_en_plan_par_la_piece.docx

Hello

I don't understand it but if you want to take your parts and your plans at the same time  make sure that the 2d and 3d are in the same folder. Then make your composition, check include drawings and then rename your parts and assemblies. This way  your new pieces will be on your new planes.

may the force be with you.


compo.jpg

Hello

Thank you all for your answers.

Classically, we use the take-away composition, but sometimes pieces are created in a hurry because they are very close.

If the person copies the drawing, renames it, but does not correct the link of the reference, it is the bazzard, Example: the 2 axes have the same shape, just the length which varies by 10 mm and there we do not see the error....

So it's just before starting manufacturing to do a check on the plan file.

So I'm looking for either a batch processing technique, or a macro that does it, or the name of the variable  that corresponds to the name of the reference.

Thank you.

A+

OK 

If you want to quickly check what's on the plan, put the mouse on a view without touching anything, wait 2 seconds and the name of your room appears as if by magic.

may the force be with you.

 

 

 


capture2.jpg
1 Like

Hello

I can't find under SW the name of the variable that stores the name of the file in reference.
I get a little lost in the help, once I found in the SW help, a graphic document with all the properties of the different SW objects. Can someone help me find it or give me the name of the variable?
Thank you.

A+

Thank you all for the leads, but that's it, I just found a bit of an answer in the examples of the help...
Get Document Referenced by Drawing View Example (VBA)
And it works on one level, :D now I just have to succeed in automating it.... Open a file from a list, activate and select a view, then read the value, store it in another file.... almost nothing :oops:
Thanks again for the different leads.
A+