Done with pdf moving on to dxf

Mar 10, 2009 5 Replies

Hi All,



With your help Ive succeeded and more importantly I understood how to make a macro that save's a drawing sheet as pdf.



Now I'm moving on to a dxf.



The only thing that matters to me is that the scale is 1:1



I tried that:



if swapp.DxfOutputScaleFactor1 then swapp.DxfOutputScaleFactor=1



but got an "Object does not support this property or method" error



What am I doing wrong?



Thanks Ron.


Ron,

DxfOutputScaleFactor is not an API object or method. You can retrieve its value using the GetUserPreferenceDoubleValue method and save it using SetUserPreferenceDoubleValue.

Use this: Dim bResult As Boolean If swApp.GetUserPreferenceDoubleValue(swDxfOutputScaleFactor) 1 Then bResult =3D swApp.SetUserPreferenceDoubleValue (swDxfOutputScaleFactor, 1) If bResult =3D False Then MsgBox "Failed to set 'swDxfOutputScaleFactor' to 1", vbCritical End If End If

Mike

Got it all except the vbcritical...

Thanks.

Mike wrote:

Now I got it - its part of the MsgBOX

Thanks

Ron,

This is a pretty good group but for API questions I would use the SolidWorks-API google group or SolidWorks hosted forums instead. They are focused on API related info while this one is very generic.

Mike

Thanks Mike

See you There :)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required