Hello All,
I had run a macro to offset a shape element (inside polygon).But i didnt get output shape element inside instead it was placed outside.how to accomplish this? please help.
Thanks in advance.
Kanmani kandaswamy.
Here is the code i have tried.
Private Function offsetBuffer(dist As Double, shp As ShapeElement, insidePt As Point3d) As ShapeElement Dim startPoint As Point3d Dim Point As Point3d, point2 As Point3d Dim lngTemp As Long Dim newElem As ShapeElement Dim offElem As Element Dim resltShp As ShapeElement Set newElem = CreateShapeElement1(Nothing, shp.GetVertices) ActiveModelReference.UnselectAllElements ActiveModelReference.SelectElement shp
CadInputQueue.SendCommand "MOVE PARALLEL OFFSET "
SetCExpressionValue "tcb->ms3DToolSettings.offsetCurve.makeCopy", 1, "3DMODIFY" CadInputQueue.SendCommand "MOVE PARALLEL OFFSET " SetCExpressionValue "tcb->ms3DToolSettings.offsetCurve.activeSymb", 1, "3DMODIFY" CadInputQueue.SendCommand "MOVE PARALLEL OFFSET " SetCExpressionValue "tcb->ms3DToolSettings.offsetCurve.distance.value", (ActiveModelReference.UORsPerMasterUnit * dist), "3DMODIFY"CadInputQueue.SendDataPoint insidePt,1 CadInputQueue.SendDataPoint Point3dZero, 1
CommandState.StartDefaultCommand Set offElem = ActiveModelReference.GetLastValidGraphicalElement Set offsetBuffer = offElemEnd Function