Article | 41024138 |
Type | HowTo |
Product | Engine |
Version | 5.1.1.1038 |
Date Added | 10/27/2005 |
Submitted by | Pierpaolo Dondio |
Keywords |
Dim Pline As vdPolyline Dim temPLine As vdPolyline Dim newPoly As vdPolyline VDPro1.CommandAction.Zoom "W", Array(-5, -5), Array(10, 10) Set Pline = VDPro1.ActiveDocument.Entities.AddPolyLine(Array(Array(-2, 0, 0), Array(3, 0, 0), Array(3, 2, 0), Array(5, 6, 0), Array(-3, 3, 0))) Pline.Flag = PlFlagCLOSE 'Ensure that is closed Pline.SPlineFlag = SFlagFITTING 'Make the SPline Pline.Invalidate Set temPLine = VDPro1.CreateInstance(OBJ_POLYLINE) 'Create a copy of the spline above as a simple polyline Set temPLine = Pline.Copy temPLine.SPlineFlag = SFlagSTANDARD MsgBox "Press ok to create a offset image of the object" VDPro1.CommandAction.CmdOffset temPLine, 0.8, Array(4, 1) 'Offset the temporary polyline Set newPoly = VDPro1.ActiveDocument.Entities.Last 'Set the newpoly to be the result of cmdoffset newPoly.SPlineFlag = SFlagFITTING VDPro1.DrawEntity newPoly, 1