8Complex
Mechanical
- Jan 28, 2004
- 38
Can someone please help me with this? I am going out of my mind trying to get this to work, but all of my tests and guesses have failed.
I've already got a larger macro to put this code into, so all I want is to be able to run a simple macro and change the selected dimension tolerance font scale to 0.75. I will integrate it into my other code once I get it working.
After snagging some other code I found on here and messing with it appropriately, I've had no luck. Here is what I've got it trimmed down to :
This keeps throwing a "Compile Error / Expected: =". When I try to throw an = in there, it has me set the values again, which I still just can't make happy. What exactly is this looking for, and am I calling it properly?
FYI, I'm on SW2006 SP3.1.
I've already got a larger macro to put this code into, so all I want is to be able to run a simple macro and change the selected dimension tolerance font scale to 0.75. I will integrate it into my other code once I get it working.
After snagging some other code I found on here and messing with it appropriately, I've had no luck. Here is what I've got it trimmed down to :
Code:
Dim swApp As SldWorks.SldWorks
Dim swDoc As SldWorks.ModelDoc2
Dim swDim As SldWorks.Dimension
Dim swTol As SldWorks.DimensionTolerance
Sub main()
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
Set swTol = swDim.Tolerance
swTol.SetFont(False, True, "0.75")
End Sub
This keeps throwing a "Compile Error / Expected: =". When I try to throw an = in there, it has me set the values again, which I still just can't make happy. What exactly is this looking for, and am I calling it properly?
FYI, I'm on SW2006 SP3.1.