Ok...for those that asked.
This is a code snippet...
...
sSheet is an object set to the current drawings sheet
DwFile is an object set to the current drawing file
TF is a boolean
dDXFScaleFactor is a Double
ModelDoc is an Object, set to the current Active File - This probably could be the DwFile. I havn't looked.
...
Set sSheet = DwFile.GetCurrentSheet
Sheets = sSheet.GetProperties
dDXFScaleFactor = Sheets(3) / Sheets(2)
DwFile.ForceRebuild
TF = swApp.SetUserPreferenceDoubleValue(swDxfOutputScaleFactor, dDXFScaleFactor)
ModelDoc.SaveAsSilent Path & "\" & PartNo & "-" & Rev & ".dwg", True
ModelDoc.SaveAsSilent Path & "\" & PartNo & "-" & Rev & ".dxf", True
This is part of a much larger routine that allows the user to select multiple files then export all of them to a common directory, then zip them all up in a nice tidy Zip file.
This routine exports:
From the Model
.iges
.sat
.step
.x_b
.x_t
.eprt or .easm
.sldprt or .sldasm - Saves it out of the configuration file and deletes all other configurations.
From the Drawing
.dwg
.dxf
.slddrw - Linked to .sldprt or .sldasm from above.
Basically, I am generating a copy of everything and setting it aside so that the distributed file is relatively stable. *Note - For assemblies, we do not distribute the model or the drawing since you would then have to distribute all the associated parts with it.
Even after the modification above, we are still having scaling problems with the dwg/dxf file. If anyone could help me to figure out why, I would sure appreciate it.
Thanks and have fun,
John G.