What's the best way to control angles using a Macro user form?
I've finally got some time to play with Macro's in Solidworks and I just need a little help with understanding what I'm actually doing. As far as I can tell, angles are translated to radians back and forth, but this leaves me with very inaccurate final angles etc. I've attached a very simple part & macro in a ZIP file to show you exactly what I'm trying to do.
Obviously, if I type in 100 in the Angle textbox3, I'd like model to then update to 100 degrees. But because VB or Solidworks converts to radians, I get an odd Angle number. As is, angle part of the macro is incomplete as I'm not too sure of the best way to tackle this problem. Note, that I may be going about the entire project completely wrong too, as I'm self taught with Solidworks and Visual Basic!
Private Sub CommandButton1_Click()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Part.Parameter("Length1@Sketch1").SystemValue = (TextBox1.Value / 1000)
Part.Parameter("Length2@Sketch1").SystemValue = (TextBox2.Value / 1000)
Part.Parameter("Angle@Sketch1").SystemValue = TextBox3.Value
Hopefully someone will be able to help me!