Search the Community
Showing results for tags 'mline justification'.
-
Can't Change the Justification and Scale of MLINE with VBA
biguelo posted a topic in .NET, ObjectARX & VBA
Hi, I'm trying to draw a MLINE using the vertex of a Polyline and that part of the macro works ok, but when I try to change the justification and/or the scale of the MLINE changing the system variables before drawing the MLINE, it doesn't work, I always get the same justification and/or scale. The strangest thing is that when I check the system variables in the command line they have the value the macro set but the MLINE drawn by the macro doesn't assume the new justification and/or scale. What is the problem? Using Autocad 2009 or 2014. Here is my code> Public Sub poly() Dim pline As AcadLWPolyline Dim multiLine As AcadMLine Dim points(0 To 5) As Double Dim mpoints(0 To As Double Dim varData As Variant points(0) = 2: points(1) = 4 points(2) = 4: points(3) = 2 points(4) = 6: points(5) = 8 mpoints(0) = 2: mpoints(1) = 4: mpoints(2) = 0 mpoints(3) = 4: mpoints(4) = 2: mpoints(5) = 0 mpoints(6) = 6: mpoints(7) = 8: mpoints( = 0 ThisDrawing.SetVariable "CMLJUST", 1 ThisDrawing.SetVariable "CMLSCALE", 3 ThisDrawing.Regen acActiveViewport Set pline = ThisDrawing.ModelSpace.AddLightWeightPolyline(points) Set multiLine = ThisDrawing.ModelSpace.AddMLine(mpoints) multiLine.Update ThisDrawing.Application.ZoomAll End Sub Thanks- 2 replies
-
- scale mline
- mline justification
-
(and 2 more)
Tagged with: