![]() its a little more complicated looking, but the purpose of it is to be able to make the point array with the VBA ARRAY statement. To make 3D polylines to use in region making, i use an old sub i use for drawing 2D profiles, modified for 3D. my pt sub that creates point arrays expects a double. I shouldnt run a loop counter with a double, but it didnt cause any trouble. Init sets up the min and max for y and Z. This is the test code to create planes setting x = 1,2,3,4,5,6,7,8,9 and setting a layer with the same name and color. Sub plane_pl(pline As Acad3DPolyline, Optional strlayer As Variant)Ī simple equation such as x=3 is a line in 2D space, but its a plane in 3D space. You cannot pass the polyline directly to AddRegion if you do that, the array only needs one slot. ![]() ![]() Regionobj(0).EntityTransparency = g_transparency Sub plane_4pt(pt1() As Double, pt2() As Double, pt3() As Double, pt4() As Double, Optional strlayer As Variant) To view a region you have to change the autocad visual style to anything except 2D Wireframe. In this sub to make a region from 4 pts i added an optional layer argument and a global variable to control transparency. Sub plane_3pt(pt1() As Double, pt2() As Double, pt3() As Double) The Region object works fine.ĪddRegion takes an array of autocad entities which must be a closed figure. Set Sweep1 = has a point, a line, but no plane object. Pts = Pol圜oords(oEnt) ' Here is the mismatchĬirclecenter(0) = 0: circlecenter(1) = 0: circlecenter(2) = 0 ![]() MsgBox "Method is not applicable for this entity type" If Not TypeOf oEnt Is AcadLWPolyline And _ I get a type '13' mismatch on "polycoords". But at the moment I'm stuck while trying to get the coordinates from my polyline. The idea is to make two circles to extrude along any polyline given. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |