bharthts01 Posted August 23, 2012 Posted August 23, 2012 Hey guys it's me again. I'm using an auto lisp for labeling X and Y coordinates which I'm pretty happy with (thanks to you guys) I've just some minor adjustments I want adding. The above coordinates are taken by the lisp program itself. The coordinates below is how I want the lisp to look like. I've basically drawn a line and then an arrow pointing at the point as well as re-sizing the text to suit. (defun c:dimo ( / p ) (while (setq p (getpoint "\nSpecify Point <Exit>: ")) (command "_.dimordinate" "_non" p "_T" (strcat "X=" (rtos (car p) 2 0) "Y=" (rtos (cadr p) 2 0))) ) (princ) ) And that's the code I'm using. Thanks Quote
Tharwat Posted August 23, 2012 Posted August 23, 2012 Just change the height of the Text style which is in current Dim style to suit your needs . Quote
bharthts01 Posted August 23, 2012 Author Posted August 23, 2012 What about the 'arrow and line' so it looks neater? Edit: Changed the height of the text thanks. Quote
Tharwat Posted August 23, 2012 Posted August 23, 2012 From the same dialog for the dimension styles . Type at the command line: dimstyle and look into the tab ( Symbols and Arrows ) Quote
bharthts01 Posted August 23, 2012 Author Posted August 23, 2012 I changed the arrow heads, it doesn't make a different. Is it as simple as changing the dimension styles or because it's an auto lisp do I have to put that into the program itself? Quote
Tharwat Posted August 23, 2012 Posted August 23, 2012 The dimordinates command does not have arrow heads, so you will not see any difference of course You may need to use Qleader or Mleader to manipulate with Arrow heads ' sizes . Quote
bharthts01 Posted August 23, 2012 Author Posted August 23, 2012 I'm sorry I don't know that command, tried playing about with it but to no avail Quote
Lee Mac Posted August 23, 2012 Posted August 23, 2012 Here is an example for you to consider: [color=GREEN];; Creates an MLeader object with two vertices displaying the coordinates[/color] [color=GREEN];; of the first selected point expressed relative to the current UCS, in[/color] [color=GREEN];; decimal format rounded to the nearest integer.[/color] [color=GREEN];; By Lee Mac 2012[/color] ([color=BLUE]defun[/color] c:pt ( [color=BLUE]/[/color] ml p1 p2 sp ) ([color=BLUE]setq[/color] sp ([color=BLUE]vlax-get-property[/color] ([color=BLUE]vla-get-activedocument[/color] ([color=BLUE]vlax-get-acad-object[/color])) ([color=BLUE]if[/color] ([color=BLUE]=[/color] 1 ([color=BLUE]getvar[/color] 'cvport)) 'paperspace 'modelspace) ) ) ([color=BLUE]while[/color] ([color=BLUE]and[/color] ([color=BLUE]setq[/color] p1 ([color=BLUE]getpoint[/color] [color=MAROON]"\nPick Point: "[/color])) ([color=BLUE]setq[/color] p2 ([color=BLUE]getpoint[/color] [color=MAROON]"\nPick Endpoint of Leader: "[/color] p1)) ) ([color=BLUE]vla-put-textstring[/color] ([color=BLUE]setq[/color] ml ([color=BLUE]vlax-invoke[/color] sp 'addmleader ([color=BLUE]append[/color] ([color=BLUE]trans[/color] p1 1 0) ([color=BLUE]trans[/color] p2 1 0)) 0)) ([color=BLUE]strcat[/color] [color=MAROON]"X="[/color] ([color=BLUE]rtos[/color] ([color=BLUE]car[/color] p1) 2 0) [color=MAROON]" Y="[/color] ([color=BLUE]rtos[/color] ([color=BLUE]cadr[/color] p1) 2 0)) ) ([color=BLUE]if[/color] ([color=BLUE]<=[/color] ([color=BLUE]car[/color] p2) ([color=BLUE]car[/color] p1)) ([color=BLUE]progn[/color] ([color=BLUE]vla-setdoglegdirection[/color] ml 0 ([color=BLUE]vlax-3D-point[/color] '(-1.0 0.0 0.0))) ([color=BLUE]vla-put-textjustify[/color] ml [color=BLUE]acattachmentpointmiddleright[/color]) ([color=BLUE]vlax-invoke[/color] ml 'setleaderlinevertices 0 ([color=BLUE]append[/color] ([color=BLUE]trans[/color] p1 1 0) ([color=BLUE]trans[/color] p2 1 0))) ) ) ) ([color=BLUE]princ[/color]) ) ([color=BLUE]vl-load-com[/color]) ([color=BLUE]princ[/color]) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.