Hello
Is there a way to use a macro to find out if there is a drawing attached to a part or assembly?
Method or property or coded?
Thank you.
A+
Hello
Is there a way to use a macro to find out if there is a drawing attached to a part or assembly?
Method or property or coded?
Thank you.
A+
Hello
Right-click, open the drawing should be enough, right?
Hello
Yes in a normal case, but here I want to automatically process a whole batch of parts and assemblies.
Hence the macro.
A+
Hello
If the name of the plan file is the same as that of the 3D file with the extension ready (including the path) then no problem, the opendoc6 function meets your needs ... Otherwise I don't know of a function that could meet your needs, maybe in the SWDitimMgr APIs but I don't know them.
If your plan file has either the same or a different name and is stored either in the same folder or in a subfolder as where the 3D file is stored, then you can retrieve the path and name of this plan file using the GetPackAndGo Method (IModelDocExtension) function and then GetDocumentNames Method (IPackAndGo).
Kind regards
Hello
Thank you for your answers.
Yes, the drawing has the same name as the part and is stored in the same folder as the part.
I'm going to look at the different controls, but I don't want to open up the drawing, just find out if it exists.
So if you have bits of code I'm interested, being a beginner in code....
Thank you.
A+
Hello
If it's just to check the existence of the file, you can use the code you'll find HERE.
Kind regards
Hello
Thank you all it works....
A+