I have tried to run your macro with default parameters for T2J model but never reached the arc building code. I have three lines and thin extrusion as the result.
Regarding the dimensioning of the length of the arc, you need to select end points and the arc segment then place the dimension. Here is the simple macro:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swInputDimValOnCreate, False
swModel.SketchManager.AddToDB = True
swModel.SketchManager.CreateLine 0#, 0#, 0#, 0.01, 0#, 0#
Dim swSkArc As SldWorks.SketchArc
Set swSkArc = swModel.SketchManager.CreateTangentArc(0.01, 0#, 0#, 0.14, 0.045, 0#, 1)
swSkArc.GetStartPoint2().Select4 True, Nothing
swSkArc.GetEndPoint2().Select4 True, Nothing
swSkArc.Select4 True, Nothing
swModel.AddDimension2 0.1, 0, 0
swModel.SketchManager.AddToDB = False
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
translationXpert – SolidWorks files language translator
Thank you! This will help tremendously.
To answer your question, the reason you aren't seeing the same behavior, is that I've modified the dimension value for the "T2J" part of the for loop to 1 inch, instead of .118 in .
My hypothesis is that it has something to do with grid snapping while sketching but I am not 100% sure. I can "break" the code and reupload if you're interested in taking a closer look.
Thank you for the reply. Being able to dimension the arc length is a huge help.
Yes, please break it. I will take a look.
I actually have updated the code now, and removed some areas that were causing problems, and can't get it to repeat the weird behavior that it was doing previously. I am going to have to assume it was some "user error" on my end, rather than anything in the API, as I am still pretty new to this.
If you'd like to see the updated macro, I'd be happy to email it to you.
Thank you for your help and time with this.
I'm marking your previous answer as correct, because that section of code is what I was looking for!