Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set coordinate system macro

Status
Not open for further replies.

sisau

Mechanical
Mar 5, 2010
19
0
0
SE
ello, i've written a macro for SW2007 but it doesn't works. i think the reason is that i need to set csystransform. the macro i have written is the following:

Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim mass as SldWorks.MassProperty
Dim swCoordSys as SldWorks.Feature
Dim csystransform as SldWorks.MathTransform

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set mass = Part.Extension.CreateMassProperty
Set csystransform = ???

csystransform=Part.Extension.GetCoordinateSystemTransformByName(swCoordSys.Name)
mass.SetCoordinateSystem(csystransform)

the answer is not "Set csystransform = New MathTransform"
any idea about how to do it? thank you!
 
Status
Not open for further replies.
Back
Top