ࡱ> &acadt am  *\G{000204EF-0000-0000-C000-000000000046}#4.0#9#C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*\G{C094C1E2-57C6-11D2-85E3-080009A0C626}#1.1#0#D:\AutoCAD_2000i\ACAD.TLB#AutoCAD 2000 TyRoot Entryu@.VBA_Project`J/uVBA fJ/ WK/PROJECTwm>  R !"#$%'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQUSTVWXYZ[\]m_`abcdefghijklnopqrs}uvwxyz{|~PROJECTThisDrawing __SRP_4 __SRP_5B  !"#ID="{1B3FF3A2-0713-40D8-8CE9-98178031FDE2}" Document=ThisDrawing/&H00000000 Module=Editing Name="ACADProject" HelpContextID="0" VersionCompatible32="393222000" CMG="B0B27E8482848284828482" DPB="F8FA36C937C937C9" GC="40428E118F118FEE" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisDrawing=0, 0, 0, 0, C Editing=22, 22, 637, 496, Z ThisDrawingThisDrawingEditingEditingEditing -__SRP_2 ^__SRP_3x*_VBA_PROJECTdir n__SRP_0t3__SRP_1nVBA_Project_Version(rU~}  Qpj0* pHd ACADProject8@ = t  %&o=(# J< rstdole>stdole f%\*\G{00020430-;C 0046}#2.0#0#C:\WINDOWS\SYSTEM\STDOLE2.TLB# Automation^s`wThisDraw@ingGThisD@rawnPg 2Q#H1 ,@("+BEditDii@L2::Q!C<jx`#<d:U?I?bu!= &%S4NJ/& x%S4NJ/& d:U?I?bME(SLSS6"N0{8E75D913-3D21-11D2-85C4-080009A0C626} (%H` % %`h8@tt0%&o=#$*\Rffff*083b19e8c14 xpаAttribute VB_Name = "ThisDrawing" Bas0{8E75D913-3D21-11D2-85C4-080009A0C626} |@GlobalSpacFalse dCreatablPredeHclaIdTru BExposeTemplateDerivBustomizD2Option /licit e$tp0   0   0   0   0   0   0 @  0 (  0   0   0   D```tT7stdole f%\*\G{00020430-;C 0046}#2.0#0#C:\WINDOWS\SYSTEM\STDOLE2.TLB# Automation^s`wThisDraw@ingGThisD@rawnPg 2Q#H1 ,@("+BEditDii@L2:b:Q!C<jx`#<d:U?I?bu!= &%S4NJ/& x%S4NJ/& d:U?I?bME(SLSS6"N0{8E75D913-3D21-11D2-85C4-080009A0C626} (%H` % %`h8@tt0IJ;$*\Rffff*083b19e8c14 xpаAttribute VB_Name = "ThisDrawing" Bas0{8E75D913-3D21-11D2-85C4-080009A0C626} |@GlobalSpacFalse dCreatablPredeHclaIdTru BExposeTemplateDerivBustomizD2Option /licit 0 "  0   0 X  0   0   0   0 h  0 H   .pt$ t ,lp=x)tp'0%'@%'P%'`%x H????3'':PN:`N 6'MP %t(`%x t t  $ 3'':PN:`N 60p:`%t$ t p X)tp\Dx0,0 2 _Circle 1,1,0 4  _Zoom A Example_ExplodeExample_GetBoundingBox Min Extent:  , ,GetBoundingBox ExampleqpointsAddLightWeightPolylineClosed, mirrorObjsMirroras(Example_Mirror3DboxObj^u Acad3DSolidlengthYheight|AddBoxd mirrorPt1{ mirrorPt2{ mirrorPt3{ mirrorBoxObjMirror3D: NewDirectionActiveViewport  Direction& (Example_MoveZ(Example_Rotate basePoint@ rotationAngle5Rotate(Example_Rotate3DRegen  rotatePt1E rotatePt2F rotateAngleAaxisLineiAcadLineeAddLine8UpdateRotate3D;L(Example_TransformBylineObjmstartPt'endPtytransMat% TransformBy(Example_EndUndoMark3stPntaVendPnt>ja StartUndoMarkl EndUndoMark*(Example_SendCommand SendCommandcvbCr$acAllViewports,PgP1^P2^ _B_var_point1_B_var_circleObja _B_var_pointsȕNumObjrFanglesCtrPntHIrU~| 0 00)ya4 40 (  0   0 h  0   0 x   $A@ <jx`#<d:U?I?bu!= &%S4NJ/& x%S4NJ/& d:U?I?bME(SLSS6"N0{8E75D913-3D21-11D2-85C4-080009A0C626} (%H` % %`h8@tt0D;rU @nrU xpe Library*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM\STDOLE2.TLB#OLE Automation %&o=#`ThisDrawing083b19e8c1ThisDrawingEditing103d7117d2HEditingQ8[_BN8b\RMyq8"SHUmW As=dimBDoubleCEachOexitTFor^gotobInjIntegerllboundslineObjectOnReDimresumeSetstepstopSubTextTouboundWidthAutoCAD"VBAWin16~Win32MacVBA6#Project1 stdole` ACADProject ThisDrawing5 _Evaluate AcadDocumentZModule1bExample_ArrayPolar@ circleObj AcadCircle,centerW;RadiusV ModelSpace_ AddCircleZoomAllm$MsgBoxR noOfObjects angleToFill(basePntyvretObj ArrayPolarWExample_ArrayRectangular Application* numberOfRows| numberOfColumnsPnumberOfLevelsdistanceBwtnRows$distanceBwtnColumnsdistanceBwtnLevelsgArrayRectangular`Editing. Example_CopyH copyCircleObjCopyƿpoint1point2Move>yColor2FacRed CopyObjectsoldObj1-voldObj2.vnewObj1newObj2oldRad1oldRad2newRad1y,newRad2z,IDPairs SourceObjectsҖObjectsReturnedacYellowKeyvbTabc9vbCrLfValueKExample_MirrorplineObjCAcadLWPolylinepointsAddLightWeightPolylineClosed, mirrorObjsMirrorasExample_Mirror3DboxObj^u Acad3DSolidLengthYHeight|AddBoxd mirrorPt1{ mirrorPt2{ mirrorPt3{ mirrorBoxObjMirror3D: NewDirectionActiveViewport  Direction& Example_MoveZExample_Rotate basePoint@ rotationAngle5RotateExample_Rotate3DRegen  rotatePt1E rotatePt2F rotateAngleAaxisLineiAcadLineeAddLine8UpdateRotate3D;LExample_TransformBylineObjmstartPt'endPtytransMat% TransformByExample_EndUndoMark3stPntaVendPnt>ja StartUndoMarkl EndUndoMark*Example_SendCommand SendCommandcvbCr$acAllViewports,PgP1^P2^ _B_var_point1_B_var_circleObja _B_var_pointsȕNumObjrFanglesCtrPntRowNummRColNumXELevNum!ColDis(RowDis=LevDis0newObj$GP3^MirObjmaRangle}NewDir\ RotPt1RotPt2RotAngMatrixnExample_Explode=[SetBulge;OexplodedObjectsfExplodei` ObjectName acByLayerExpObjLExample_GetBoundingBox startPointendPointyminExttmaxExtAGetBoundingBoxY vbInformationnExtMinXExtMax:Example_IntersectWithKcenterPt intPointsZ IntersectWith acExtendNone>kbstrVarTypepvbEmpty˜LinObj4CirObj~IntPtssMsgQExample_Offset7+ offsetObjO7OffsetExample_ScaleEntityN scalefactor?Q ScaleEntity܉ _B_var_SetBasePtjFactor Example_Area-$ plineAreaaAreaBAreaObExample_Coordinate_; AcadPolyline^ AddPolyline coordV CoordinateQP0^XyzExample_CoordinatestretCoord_ Coordinates!kExample_InsertionPoint,textObj`AcadText~ textString InsertionPointAddTextQcurrInsertionPointtxtStr50currPPointIIpointʔtxtObj/Example_Normal.Y currNormal?#Normal newNormalNorm1Norm2Example_Rotation RotationeExample_Thicknessi centerPoint currThickness\ Thickness'~Thick1V<Thickns< _B_var_SubnewSSetRAcadSelectionSet SelectionSetsAddrSelectOnScreenCount0v Highlight_Entry AcadEntityi _B_var_forjLnwxtd _B_var_nwxt AcadPointPHerefAddPoint oPointaPointYeMinF?eMax(>ItemzDeletex SetVariable?R BooleUnionObjOneeC1\R1^ AddSphere&uacGreenbObjTwoC2\H2o]R2^ AddCylinderIsoLines_acUnionl] sectionObj AcadRegiond SectionSolidCentroidgBoole _B_var_Objectj AddEllipseğ AcadEllipsegAxisMjRadRat SelSetDeletes Add3DPoly9Acad3DPolylinedoesn`AddLine08 newselset]1_B_var_newselset!+GetBoundingBox1p _B_var_LBound _B_var_UBounddcZtiB_ _B_var_ti _B_var_Next'o _B_var_ExpObj'Copy2T\ _B_var_newObj_B_var_i Explode2a_B_var_AcadSelectionSetmUtility1J GetIntegerD[DistesCountNxExplodeOnScreenacSelectionSetAll.MxN^Md UndoMarks_B_var_PCoordsf Coordinatex&kAddText1  SelectAtPointw_B_var_textObjRiFixIt8N1L^N2M^xoExample_Normal_E~AddHatch AcadHatchPatNam#PatTyp Assoct8LoopOTslAppendOuterLoopxEvaluateTZoomall't _B_var_all81xFixIty _B_var_RotAngL endtUndoMarkf6CosOSinTk_B_var_TTransformBy_AnimateTransformBy_Animation^_B_var_AcadEntityNormal2Neonerror_B_var_onerrorn _B_var_On6 Thickness2  ErrorHandlerOCopyTimevTimer1Timer2getvar@B _B_var_getvar GetVariable~HI $9U9 `QxMEpl4x0tPH<<<<< <<<<< <$<<` h `@ 5 T `  ~!`p@ ` ` p ``0 4 `N@  `  X$ @ @ @  X@@hP ( ! @@H (@@h 8`@  8Ph x0 xh(   x NP `P  P@(  $ H Pt @p @` H  ` !Pp @"X`@P  `P"` P"0P @@ P"0"(< "` ""(HP @@ (# h8`@( hP(!( @p @` $(P @@ @0 % @ X@ h%( @ @ % @ (% @ % @p ((! ##!(8&(* ((t @p @` @P @@ @0 p( (X  @ @ @ "@ @ @ @ (( @ @ ) -(8( p @` h)(P @@ @0 ) @ @ )( @ @ (* @ X* @ - @p 0 0(+2h*2Pt @p @D p@4 @$ @,( (@ @ H, @ @ ,( @ @ ,t @d @T -(D @4 @$ P- @ - @ 2 2 P0 8.2X @2@L @< 28 X8/20**( 2t @p @D @4 @$ (0@ @ @ @ X0 @ 2 120*@2t @p @` @P @@ @0 02X @ @ @ @ 2 @h4`t @d h40`083@Lph @d @  @ H2` X 81X%&o=#$*\Rffff*103d7117d2 6A B * B PPB RB RB RPC NC C D " hE".  8@H(80X $   "0 8D " 8p".x  @ @HP.. `  0"08 PD " ;".; ; ;<2* <2*X<"+< <(<"p=2<'<= (="0H=8= xE " hD?".? ? ??2*@2*8@"+p@ ??xA  "E?@AAA@0@(@@ A PA5hA "0AHA pD " @".  (08@@0 X h du&2 ( #8 HbP ( #  x"0( D " ".  (@ //"08 D " x ".  *H +=v=&.  "0x@ D "  ".  hx8080 +X &(    "0@ D " 8@".H p hx2*2*2* P&I X  "0 D " ".   G (/02*02+h "p 1 "0  " ".   +@ `"2!h  "0  "".  2*p h"+@ "0   "(0".8 ` 2*4*pP  3 p"0xx  " x".H (82* @ "P + "0P  ")4QayV`$*\Rffff*083b19e8c14 xpаAttribute VB_Name = "ThisDrawing" Bas0{8E75D913-3D21-11D2-85C4-080009A0C626} |@GlobalSpacFalse dCreatablPredeHclaIdTru BExposeTemplateDerivBustomizD2Option /licit (SLSS6"N0{8E75D913-3D21-11D2-85C4-080009A0C626} (%H` % %`h8@tt0D;$*\Rffff*083b19e8c14 xpаAttribute VB_Name = "ThisDrawing" Bas0{8E75D913-3D21-11D2-85C4-080009A0C626} |@GlobalSpacFalse dCreatablPredeHclaIdTru BExposeTemplateDerivBustomizD2Option /lici 2!".(/ H/p     .nh:hq@0fp@1Zf1T`2P; - $+`2\f:\f3\f2T`P3h; "0  " /!-/"./// //0 0 000hq(4fp4Zf4T`X5x; 1Zf5hq6fpx6T`61 2fp87Zf7hq8T`h82 2Zf8Zf 9Zf9T`94 ; (1"08:(0 E " E!!!2*!!  (78 X h px  " xD80"D8 4   "="X ( " @`".h + 2\%  *$) 6\% "0`  4 4h H " ` ".0# #"# $ *  * !# x%r@$"0X## E " X'H  P&P ".X  2*  &"&P~`' 2? !8&'J~' "0&@ 0' @' " h&*0(".8(`( ("(F~* 4?X)!(( )J~*"0((  "p&+ F+".++2*`,+(G+ ,,,%,H,0G, "0P+x+ 0, (F "E8 ". @ x>X +"># <b>.0->@b? > "0 ( 0 $8 -6=H? p-P ` H> ".>(.,8%."p..- HE LF " " "H NHF F "E( 2*2*2*( 4` p  "*px p(x( ) ))P)2)*" *H*  X* h*x* "   2* 0 78 h p ( 2*   : 0&H X  x/p "  2*2*H @ "PXhB8X>6= """""#"2*" :"# Gx]o newSelSet !%B@+]`]   +]@ newSelSet !%. B@&@]]]]]'F' R'F' 'rU~|  10 00.QM1/Ia)ya4 40   0 (  0   0   0   0 @  0   0   0   0   0   l.pt$ t ,lp=x)tp'P%'`%x T888:2!?t,"*$x l$c +m,8MP %tk*D`%x t t *d 0p:`%t$ t p X)tp\T<x8tp0 .pt$ t ,lp=x)tp'P%'`%x T888Ztoz! @t3mM %8MP %t(`%x t t $ 0p:`%t$ t p X)tp|0hx8tp0 h  0 H  0   0 (  0 P  0 @  0 @  0 !  0   , $ $.pt$ t ,lp=x)tpXXX'$%'4%XMD %x LG''':4t(D%x tW t6 toz! @t%ok4%t(D%x ttt(D%x t tG''':4 t(D%x tW t6 0p:D%t$ t p X)tpT<xX(tp0 @  0   0   D```tT7c: $ l=DM %`M$ %4$  4  l=x)4``DD $ p >d:e $ lh`xD40      4F'A@(oPHpMirror SelectionSet...A@* newSelSet !%B@A@(A@] newSelSet !%.+ B@F newSelSet !%B@? %%V'+Offset SelectionSet...A@*]p X$(VA@(o:2!?' , 45 degreesde]8 newSelSet !%.ine th B@]p] B@o`A@] newSelSet !%.'F B@FA@( newSelSet !%B@B@ Example 12-13.hH     %B@] ] ] +F+F+ z! @'+Z'o ] ] newSelSet !%.0 H B@H newSelSet !%B@ Example 12-17.P  Example 12-18.@ Example 12-19.@. run Coordinate and Coordinates in sequence. wil- Assumes LWpline from Example 12-17 exists,ade,o  " !$%&.]  B@$  +  B@ $A@(o$ turned at and viewed  B@8"`xXP) '' #x#@]]h](]#`x!'] newSelSet !%.]  ! @ ` b  %B@\  newSelSet !%B@+]]ioT?'boX#$] H B@H]]]o %B@lyli  !$%. newSelSet !%. (A@( +F +F +F+Areao`) newSelSet !%B@ %%t'R0 R %,t] H B@H+RF +R +RF+R'X0,4o`A@] newSelSet !%. World  B@X]0 +F+F+(+\F+\F+\FT SHAX/3 Example 12-22.]@ H B@H  ! t.Co  ! newSelSet !%.(VPOINT R 315 30 B@ D newSelSet !%B@ /H  %!'|( X  %(V*] o24 (Obje77::;<:8:@]o]]h]+F+F+'   !$%.x)( (V9]]P]+F+F+'F'    !$%.](IsoLines B@<'\ %   B@ SHADEMODE Gouraud+edges B@o7P88] newSelSet !%.@ B@F newSelSet !%B@']  e ]@K*mrU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . 9rBQvW  e  )   Project1 ACADProject ThisDrawingModule1F@C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\VBA\VBA6\VBE6.DLLVBA A i0W &D:\AutoCAD_2000i\ACAD.TLBAutoCAD a@0FC:\WINDOWS\SYSTEM\STDOLE2.TLBstdole Max Extent: 9aPExample_ArrayPolar u!= &d:U?I?bu!= &%S4NJ/& Xh{ _ AcadDocument @(x`5%^I`5()`5u!= &u!= &9a LPerform the polar array on the circle. $ArrayPolar ExampleW[`5 ,Polar array completed.9VBE6.DLL S Example_ArrayRectangular XPerform the rectangular array on the circle. 0ArrayRectangular Example 8Rectangular array completed.Editing Example_Copy Copy the circle. Copy Example dMove the copied circle 2 units in the X direction. Move completed. CopyObjects oldObj1 ID: Key   oldObj2 ID:    newObj1 ID:  ValueFExample_Mirror()`5 (Mirror the polyline. Mirror Example IsoLines "Mirror completed.Example_Mirror3D()`5()`5 Example_MoveExample_Rotate DRotate the polyline by 45 degrees. Rotate Example &Rotation completed.Example_Rotate3D()`5 ^Rotate the box 30 degrees about the axis shown. Rotate3D Example <The box is rotated 30 degrees.Example_TransformBy &Transform the line. &TransformBy Example 0The line is transformed.Example_EndUndoMarkExample_SendCommand _Circle   2,2,0 4 _zoom a bThe extents of the bounding box for the line are:' A circle command has been sent to the command line of the current drawing. VMove the circle 2 units in the X direction. Move Example 0,0,0 2 _Circle 1,1,0 4  _Zoom A Example_ExplodeExample_GetBoundingBox Min Extent:  , Add3DPoly ,GetBoundingBox ExampleExample_IntersectWith &Intersection Point[ ] is: *IntersectWith Example 3 Example_Offset 8Offset the polyline by 0.25. Offset Example Color "Offset completed.E  circlQ @'5]]]+F+F+    %4'A@(o7;]] ]]]]P+ F+ F+ F+ F+ F+ ?'    !$%.o7A@A@ )       %F'77; newSelSet !%.. newSelSet !%B@B@]8 ]8;@`8Escher'l+F+F++F+F++F+F+  !$%.`7 Example 12-10.8A@(] Example 12-11.  '] nd If PIntersectWith ExampleA@*Bo(7X8]8]]XA@   !$%.~op:] newSelSet !%.~ B@~v % @ %%>'Nԯa{@+F?+F +@+F?+F+9A@<A@] newSelSet !%. B@rU] ]XBoundingBox extents: $,$,$ (min) $,$,$ (max)A@*]@  !$%.  !$%.PDMODE" B@ newSelSet !%B@Q5o:   %B@0;p<p;0Bx=A@A@] newSelSet !%. B@]8]   X (V.    %. newSelSet !%B@]]h +F@+F++F@+F+A@(o8 Example 12-12.(9:A@] newSelSet !%.8 B@F newSelSet !%B@(    %%.]+F+F+++F+F++]- (V]P] A@(o8 Example 12-15.8+F+F+0==<x]0]+F+F+ @+F+F+ 'o789;;9A@] newSelSet !%. B@]0  & ! 'Bb  ' {    SelSet Item=  LBound= $$ UBound= $$A@*!=  $$ $$ L   $$#(Vpol  $$#B@Exploded Object :   $$#! A@* "  $$#(VPol  $$#B@ d. newSelSet !%B@S  Example 12-unnumbered.o85]]]p5XC<<<<<] newSelSet !%.B@T B@( newSelSet !%B@elSet=    %B@Tm( Ih>] ]hInput X-distance: !:%<'@0>>;pB= B$P<< Cou B@ 2  B`:0A ! +$hA>8=> :xample_ScaleEntity()`5 2Scale the polyline by 0.5 &ScaleEntity Example Scale completed. Example_Area BThe area of the new Polyline is:  Area ExampleExample_Coordinate()`5! ~The coordinate in the first index position of the polyline is:  , Exam newSelSet !%B@~~    %B@~`=]+F+F+=h+F+F+=p+`F+`F+`= H B@H81@]0=8BA+F+B@CBBAAB0B(B]] BXBxBBPBC`B8BACBCBC@CJ]X]]+ F+ F+ @C'"H< P-line area: !hA@*X+F+F+F% ++ ;]p ]0 ] ]x+F+F+' d   !$%.oHello, Central?'d9 newSelSet !%. newSelSet !%B@ %!~'R]o;;?@ R %(~P@ @@P@???+RF+R? 2nd is at: $R, $R & 4th is at: $R, $RA@* 4  Object has R  vertices 2nd at: ple_Normal# The coordinate in the first index position of the polyline is now: 1st coordinate: .1st coordinate is now: Example_Coordinates dThe current coordinates of the second vertex are: &Coordinates Example JThe new coordinates have been set to $R, $R & 4th at: $R, $RA@*? B@B? ?0= 3rd is at: $R,$RA@**3rd at: $R,$RA@*$RAp> \ %( B@omAl =x=h;@@x?`? %!'\se?]0X@ newSelSet !%B@t: p?@x@* need to Regen so entity can be selected Example 12-21.!Insertion point: $\, $\, $\A@*@ %B@ New point: $\, $\, $\A@*@@]( newSelSet !%. H B@H'n'p]0  %!' newSelSet !%B@, o<  %( N %B@) = <?@ 02nd vertex coordinates: &2nd vertex is now: Example_InsertionPoint Hello, World.()`5 Ipoint FThe insertion point of the text is  NThe new insertion point of the text is  PointI "Insertion point: *New insertion point: Boole JThe BpBB@@@]+F+F+b0AA@( n l p !$%h.]]+ F+ F+ '"  " !$%&2r+  r B@t B@v B@ !o@ A@h= New Normal: $, $, $A@* &' CFNormal: $, $, $A@*C C newSelSet !%B@oH@0@A@] newSelSet !%.]  B@X Rotation: %!A@*Rotation is now: %!A@*A %B@+F+F+~~@DX' z! @']X  %(* need to Regen so entity can be selectedAp   %(hDHDD  'no  %B@`EoA`ABCCBxB B@B@]BBBVPOINT R 315 45 B@d *TEXT 1,1,0 1 45 This is a short paragraph,  B@BZOOM W -1,-1 20,20 B@  from a 45-degree angle....   B@B \z! @'\ = 45BBcurrent normal for the circle is Normal Example Current normal:  New normal: Example_Rotation The Rotation is Rotation Example .The Rotation is set to  Rotation: "Rotation is now: Example_Thickness Thickness: P New thickness: XBC %.B@C]0CBAH?VPOINT R 315 30 B@e?A@] newSelSet !%.H0)] ]0 H B@Ht %.= 0:]` '\o;D \$+LF \$+LF+LF$+L+F+ $C \z! @'\ M(1, B@ % L B@ FC \$+LF \$+LF)+LF$+L~+LF+LF)+LF$+L~~+LF+LF)+LF+L~Scale by .5 at -5,-5,-5...A@*R & B@B@ L B@ B@B@BA@CCCDC+LF+LF"?+LF+LrU+LF+LF"+LF1+L~+LF?+LF+LF1+L~C L B@D \$+LF \$+LF+LF$+L \$+LF \$+LF,+LF$+L+LF+LF,+LF$+Loject+LF+LF,+LF+L FIL+LF+LF&+LF9$+L+LF \$+LF \$+LF$+L+LF \$+LF \$+LF9$+L+LF+LF&+LF9+L \$+LF+LF \$+LF$+L+LF+LF+LF9$+L \$+LF+LF \$+LF$+L+LF+LF+LF9+LGz?+LF+LF'+LF7+L+LFGz?+LF+LF7+L+LF+LF'Gz?+LF+L+LF+LF'+LF7+L newSelSet !%B@@;&Rotate \ radians about Z at $,$,$A@*~L?+LF+LF"GetBoundingBox newSelSet~a! c~a! c  contains  itemsGetBoundingBox newSelSet2 newSelSet3()`5 (BoundingBox extents:  (min)  (max) PDMODE *BoundingBox extents:   (min) VPOINT R 315 30 Perform union... 0+LF1+L8LP L B@G L B@ L B@XH B@GGG]P newSelSet !%. B@]](]H+F+F++F+F+Implement move vector...A@* !    $B@T  %!N 2  $(VB@T ltipleoE newSelSet !%B@  ! `LG  N N..Intersection Point[ ] is:  $N,   $N,   $N'PHG Example 12-24.EHK]h  %B@   ! Item  Thickness:   %!A@*Item SHADEMODE Gouraud+edges  ArrayPolarArrayRectangular AddEllipseCopyMove 0Implement move vector... SelSetDeleteExplodeExplode Update Exploded Object  : ObjectName Explode ExampleW[`5 IntersectWith()`5AddLineGetBoundingBox1    L:  Thickness now:   %!A@*Item  does not have Thickness.A@*H]]h]] newSelSet !%. B@]p]H+F+F++F+F+Implement move vector...A@*  B  %!N 2   $B@T  $(V  newSelSet !%B@]oEDATE %'   A@*DATE %' ! 'B B( D/ VBA for AutoCAD 2002: Writing AutoCAD Macros Jeffrey E. Clark# Copyright 2002 Prentice Hall PTRJ This software may be freely copied and used so long as this disclaimer,K together with the above copyright notice, are included in all copies andL any accompanying documentation. These example programs are made availableK "as-is" without any explicit or implied warranty. Neither the author norG publisher warrant that these programs are error free or will operate without interruption. Example 12-1.G Example 12-2. Example 12-3. Example 12-4.rU Example 12-5.~ Example 12-6.~ Example 12-7.~ Example 12-8.~ Example 12-9.~(ine area:  CoordinateCoordinate CoordinatesCoordinates Points:  Object has   vertices 2nd:  4th:   & 4th:  2nd is at:   & 4th at:  & 4th is at:  Coordinatex 3rd at:  3rd is at: AddTextinsertionPoint Hello, CentrA This procedure may be used to remove an existing selection setI (P Example 12-unnumbered.O Dim Object As AcadEntityHS Example 12-16.PL Example 12-20.H B@G Example 12-23. HH Following are the six procedures used throughout Chapter 12 to create test entities to edit.F resulting from the unexpected termination of any of these examples.-5(G]GAttribute VB_Name = "Editing" Option Explicit ' A for AutoCAD 20020: Wrl*MacrosbJeffrey E. Clark*CopyrightA Prentice Hall PTRoThis software may be Oely copied and usso long as t6disclaimer,ttogether with#e abov&e$FnoB, 6includ+in J7s7&any acco mp documca. These example programcd=vailable'"as-is"тMout3y: i#wranty. Necfi authnor&publdisuarwatyIEerrTAwi_ope8rat%J#int up7gED7 12  U:  SelSet Item:   LBound:   UBound:  SelSet Item=  LBound=  UBound=Mirror ,Mirror SelectionSet...Mirror3DMoveCopy2 *Explode the polyline.Explode2 2nd at: (Move SelectionSet... $Input X-distance: Jm OffsetxExplode Offset ,Offset SelectionSet...Rotate BRotate SelectionSet 45 degrees...Rotate3D ScaleEntity TransformBy @Rotate 90 degrees about 0,0,0... @Rotate 45 degrees about 5,5,0... $Move by 10,10,0... 4Scale by 10,10 at 0,0,0... *Scale by 10 a2-1.Sub AyPo{() AddEllipsDim newSSet As AcadSelec  =@S@isDrawZ.I s.(" e:l "D OnScreen( @NumObjI6ge@NFanfgl&DoRH-CtrPnt(0 To 2)I= 60= 3X.14)34: 1@= |0#I+*GAKE9@tyCS2Va,riF@vEach DIn]%A=d.74, ,,Nextd ZoopmAllw6Item6.D@aNEyHa(L2+LR!4uLLE`2WLctLA+ 3Row)7L ColLevDSol4` 0$= 5:A UaD = 2OVVЁaVIBVB,, C, _"bbal?insertionPoint ,InsertionPoint ExampleInsertionPointInsertionPointFixIt *New Insertion point:  New point: Normal Normal Normal: Example_Normal_EAddHatch Escher()`5 New Normal: RotationRotation ThicknessThickness Thicknes``.`$`3`煫,W,wTtTP1Q2qO0: PcPDDRP2(B42(IMsgBo0x "I!wx m}vBor...p+ i!9_Re+ .Counpt - `~ViCba $mi  i) pD]'.MQ P1x, P69^=ЈGCnYiOM{so(Xh(unnumbered(T?)~pS V~ŀ~.W %z@%q?)R#(0p|?) 0C??)?)A qr1w)͇2G et*("DATEuq%p1ٯYm 11sC0/J3d=2c O544C#A#C1@% 3333~d- 0iϑetO9)O9N94c8!ode8`3Dиۢ/rU $`$`$`$`$!`$I`$q`$`$`$ `$ `$9 `$a `$ `$`$`$`$)`$Q`$y`$`$`$`$`$A`$i`$`$`$`$ `$1`$Y`n0   0   0   0 h  0 H  0   0   0 P  0 @  0 p  0   0 `!  0 X  0   0   0   0   0   <```DDD?t8@m8DM %`M$ %4$ 4 l=x)4lhx`D40 "  D@`?``@D?DD=DM %`M, %<$ < l=x)<dhx`D<0 h  h1`:d%t$ t  l`= x)t`0`:d%t$ t  ` X )t`h(xt`     U\\\M8 %P  P\\\\\m \m \\\m \m \\\\\\\M8 %P  Pm \\m \\\\\\m \\m \\\\\\\M8 %P  PGz?\\\\\Gz?\\\\\Gz?\\\\\\\M8 %P  P d0H:8%L$ L H X)LHtPT\"#L=LH0```tTRcN $ l7 2,2... ,Scale by 2 at 0,0,0... (Scale by 2 at 2,2... ,Scale by .25 at 2,2... <Scale by .25 at -10,-10,-10... 6Scale by .25 at -3,-3,-3...  & 4th is:  4Scale by .3 at -3,-3,-3... 4Scale by .3 at -5,-5,-5... EndUndoMark UndoMarksArea P-l4mT`M8 %H$ H l4=x)H4`` $ p RdNC $ nSHT<x`eleconSetAetH4|``` ` ` ` ``4D`MH %X$ X lD=x)XD x  $ =<x '''o<#8*F( /86(T<A 9 /b' '1ߺQc",O)th"\CC)Q"[O)o.Atb]5. l7ta1ci + 1'SA6f? FPq0=" &<& " LBpkd( (i)) _  & " UBound=" &((ExpObjFor j0 = LZD TonO(j).ColJ= ac`Green )U pdate Ms@gBox "(l oded ect&:  /Nam 1 VByLayerWNext jiThisDrawing.Sel_ionSets.Item("new ").DEnd Sub 'Example `12-5. 8Get΀+()!CBoolD8Di m  As Acad  = *Add*CD5OnScyC!!eMinA Va riant axGBG0).9 ,@axB @bents(0)", 12 (min)MeMax  ax)")CCaPoint>dcbMlSpace.bB ("} W =t3bL"PDMODE", 341XX6X@Inters`bWitheX@EllipsYLinZoomAll)E)_\q _\J\  Ptls \=%q~ZG(^1),ExtendNone...d# toEntityq1:1EacheIne;qT=t.dP1, P *c8Red'0OSJ x8L)3De)/SAC B'' ";0/T#'A'^)3_) Q&2h)&Q-VD)+)P`f3+b3+2$.a "#3DSoli!QbpD #&`&3#&&45S$?N-9$ove$15/E####SA#Y_KDis™Pge vow; UtilFa(sput X-dance(0( P))Rq+)~[ "u@- 13;i).MZQLC?r10$Offset%$jʟ/%_`t gS=pl0$/I!v_ g g# d>eϐa=1#T!sv=accc=rhisDrawing.SelectionSets.Item("n ewX@").D|te End Sub ' Example 12-1 1.*8 Rotate() D` Dim  As Acad G$$= TA
Qt0F!Gpt: QR1QQ 16e 1(K-K54 `2KK 5 30P <21G6Kb%@M(Q'/L@66PJ_LLS22 J 7>1"_wJ _  UaX $L0_WL_T_H 22) = Sin(R): M(0, 3T(0) M(1, 0X0: H1H~1l>>b1 2-H;M( HCosH2 H3H/ H1Object.TransformBy (M2Upd8ate.9~9;=0! !) !ʂCC)!2>QNext iCThisDrawing.SelcionSets.Item("n ew").DbEnd Su@b '\Example 1`2-16.A UndoMarks(tDim Ct As Acad`CirclvAcenter(0 To =@ DoubIRadius I ȄQCQ== C i&I!gerC`For iB%7 = Ntart/<@ME<= ModelSpace(.Ad (, ;` Dg+ >33K=CZoomAll 88B7&8Area7LWPolylin8Pc77)()43 P([P(2`P(x`(8XD(8.pt$ t ,lp=x)tp'0%'@%'P%'`%x H+(P%t(`%x t t\'P'p':@(`% :0 (%  6pP(`%(@% (`%(@% )(P% t(`%x ttt(`%x t t\'P'p':@(`% :0 (%  6pP0p:`%t$ t p X)tp,,x 4 tppPH.pt$ t ,lp=x)tp'0%'@%'P%'`%x H"t(`%x tW t(`% (0% (p% P(% '''! 5I# *#"*##*#$*F:@%:&P@:0%  2 6P@ZDcP(4E1@P(5G6sG = --LightWee (P-dClosed=Tru&>MsgBox H"P-! a@$: " &<.a&+8+Coordin@,mDdIrc8JisKw$D} acBC< !bBnVa`riantC= % …0).Ņ&3rd at%`'",!($ = 4: f 44#Cs)ˉisߨبATAssumes LWp%from U7 exists,CWruns a Ys in sequen FZ-19o(eZdte End Sub  'Example 12-22.* RotaK(hAddTextuRegen0 TruYM Dim us As Acad @$= Ā:a1P(0 To 2)2Doubl? ) = 3: P(= 0 p 2 ~KLoopOT$0kmE !)v)pius Y'u#(1) = 2: center(B2p0 Radiusx3<Set LoopOT(0ThisDrawing.ModelSpace.AddC@ircle(, )Object.AppendOutS (Y$ *EvaluaDte UpdEnd Sub  'Example 12-.  Line ()'0010083Dim U As Acad! P1(0 To DoublPP2-2.5: -1'= " g ̈́V= P1,#TextN11NA (`%(@% (`%(@ % (`%(@ % (`%(@% ! t(`%x t t$ $''':@'(`% :0%(% :p((`% P:%@(%  6P@ 0p:`%t$ t p X)tp ,x ` tpP@ \ )$ $.pt$ t ,lp=x)tpXXX'$%'4%XMD %x L"t(D%x tW*t~''':$+(D%:%(%:%t(d%D4 6tD4(D%($%(D%($%(D%($%!t(D%x t*tt(D%x t t~''':$,(D%:%(%:%t(d%D4 6tD40p:D%t$ t p X)tpd\X@xXnd iat: " s(@ tptD40 X  , )$ $.pt$ t ,lp=x)tpXXX'$%'4%XMD %x LG''':45t(D%x tW6 t6 toz! @t%ok4%t(D%x t6tt(D%x t tG''':47t(D%x tW6 t6 0p:D%t$ t p X)tpT<xX(tpp.pt$ t ,lp=x)tp'0%'@%'P%'`%x H"t(`%x tW8 tG''':P9t(`%x tW8 t6 - (`%t(P%x t8t5$ XG''':P:t(`%x tW8 t6 0p:`%t$ t p X)tpp,x (tp;#*#x$ X/x<#*#x$ X/x%=#*#x#*#t$ X2xt>$ X?$ X%$ xt0   D```tT7