The API can certainly create that sketch for you. Where does your data come from? What do you mean by grid?
Thanks for reply.
Could you please tell me how to create that sketch in VBA Macro. Could you please give me code for the same.
Do you have a list of data somewhere that defines the sketch you want to accomplish?? Here is some very simple code to point you in the right direction. Make sure you are in Edit Sketch mode before running.
Dim swApp As SldWorks.SldWorks
Dim swModel As ModelDoc2
Dim swSketch As Sketch
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
swModel.CreateLine2 0, 0, 0, 0, 1, 0
swModel.CreateArc2 0.5, 1, 0, 0, 1, 0, 1, 1, 0, -1
I have gone through this method earlier which you have explained above.
But if I have to make the different sketch profile as above ( similar to above but little different) that time how
to write the macro. Is there any other way we can write without co-ordinate because if the sketch (in different format) is there and we cannot measure the
co-ordinate that time how to create the code to get that sketch profile.
I'm not sure what you are asking. Sometimes it helps if you explain the current manual process step by step.
I mean to say that as
1)For the above attach sketch entity is there any other method to create the macro without using co-ordinates.
2)Is this necessary every time we have to take co-ordinates for such sketch entities.
Please describe how you do it in SolidWorks manually. Step by step as Jesse sugest.
NOT say what you want but say how you usually do it.
Then we can tell you how to do it thru API.
If you don't know what you want to get than SWX and API will not help you. SWX is not a Fairy.
To create sketch you allways need coords. Even when you are doing it by hand/mouse. Macro can get those coords without your help by evaluating or just copying it. But firs you need to tell how you supose to do that.
You need to be precise.
I understood that without co-ordinates we cannot create the sketch.
But earlier when I was doing the same sketch without using API, I use to import the dxf filefor the same attached sketch and then do Convert Entities.
I was just wanted to known that can we do the same in API ?
Now it's clear.
Yes. You can import sketch from dxf thru API.
Retrieving data ...