AnsweredAssumed Answered

Make folder where assembly is created, not where the part is created:VB code

Question asked by Yash Kothari on May 28, 2018
Latest reply on Jun 14, 2018 by Yash Kothari

Hello all

I am making my debut in macros. I recently created a program to save DXF of sheet metal part into thickness wise separate folders. With the help of forum, i created the macro.Get thickness of sheetmetal part without selecting any face. Now the problem is:


The location where the 'DXF' folder is to be created uses the below code


FilePath = swModel.GetPathName


This is the location of the model(sld.prt). Is there a way, i can get the location of the assembly through which the part is referenced. Because there are some parts that get used in most of the assemblies and are inserted in assembly from the root folder only(while assembly is located in different folder).

This will make the DXF in folder where assembly is created not where the part is located.


Can this happen with a precondition that, the main assembly must be opened or any such sort of condition.

I am sure there is way out, please help


Thanks in Advance