Here is the way I create a cylinder with C++ Com.
Known data: P0 (First end point of cylinder), P1(Second end point of cylinder), D1 (First end's diameter of cylinder), D2 (Second end's diameter of cylinder).
(1) Create a sketch from two known points (Ex. P0 , P1) and their vector cross point (P2).
(2) Draw a center line from P0 and P1 as two end points.
(3) Draw four lines from four points, which are P0,P1, (P0+0.5*D1 in y direction), (P1+0.5*D2 in y direction), to make a closed area. (Such as the below picture)
(4) Use center line and the above closed area to do a revolvation.
(5) Transform the above feature as a body.
Here is my question... (Such as the below pictures)
if I want to modify the radius (Ex. D1) and make the old cylinder update to the new one, what should I do by applying the API (C++ Com) ?
Before being modified. After being modified.
Thanks a lot.
SolidworksApi macros