I'm new to api in SE.
I'm trying to create a block, using 2 planes (one for top, another for bottom), and a profile (it can be diferente from a parallelepiped), and then create some chanfers.
What I intend to do in my api.
1- Select the planes
2-Select the profile.
Then my API create an extrude, up to planes (2 directions), and after that, i need to create chanfers on the edges (only in the extrude direction).
Is this possible to do?
Yes, it is possible.
To create extrusion:
To create chamfers you can use the cutout command or method SolidEdgePart.Chamfers.AddEqualSetback.
Really nice Kabir.
One question. Imagine that I Have several sketchs in my part, and I need that my macro ask user to select the desired profile to make the extrusion, and the same for the limits of extrusion. Is this possible?
In your videos, you select the drawn sketch in macro.
For this, we will go to another level of difficulty:
You will need to know two methods:
SolidEdgeFramework.Command (to create a new command)
SolidEdgeFramework.Mouse (For the user to use the mouse)
To select the sketch (or profile) you need to create a filter for your mouse to select only sketch elements.
The extrusion depth can be set manually by typing the value or subtracting the sketh position from the target point.
An alternative to what @KabirCosta has suggested fro mouse picking would be using selection set where the user picks profiles and the limiting planes before starting the program which then checks the contents of the selection and determines the types of objects - sketch, planes, etc. - and uses them to create the protrusion.
Subsequent, edge selection for chamfers can get very tricky.
I will try to write a sample program to do exactly this if I find time, but Kabir's tutorials should provide you everything needed to put this together.