bharthts01 Posted August 17, 2012 Author Posted August 17, 2012 Nearly got it!!!! Thanks!!! Last thing..... Need an arrow pointing to the point which the coordinate states Quote
eldon Posted August 18, 2012 Posted August 18, 2012 It is good to re-invent the wheel every now and again, but for the more idle amongst us, this thread seemed to cover the current topic several years ago. Quote
Lee Mac Posted August 18, 2012 Posted August 18, 2012 How about simply: (defun c:dimo ( / p ) (while (setq p (getpoint "\nSpecify Point <Exit>: ")) (command "_.dimordinate" "_non" p "_T" (strcat "X=" (rtos (car p)) "\\XY=" (rtos (cadr p))) "\\") ) (princ) ) Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 How about simply: (defun c:dimo ( / p ) (while (setq p (getpoint "\nSpecify Point <Exit>: ")) (command "_.dimordinate" "_non" p "_T" (strcat "X=" (rtos (car p)) "\\XY=" (rtos (cadr p))) "\\") ) (princ) ) Is that the full code? Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 Is that the full code I.e Copy and paste that into notepad? Or is there more to that? Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 (defun c:ne( / oldOsmode e-x n-y ne1 prmt tx-ht vx vy x-ht xx yy ) (defun go_ne() ;(setvar "luprec" 2) (setq prmt (strcat "Enter TEXT HEIGHT<" (rtos tx-ht) ">: ")) (princ prmt) (setq x-ht (getreal)) (if (= x-ht nil) (setq x-ht tx-ht) ) (setq tx-ht x-ht) (setq e-x (car ne1)) (setq xx (rtos e-x 2 0)) (setq n-y (cadr ne1)) (setq yy (rtos n-y 2 0)) (tx-f) ) (defun tx-f() (setq vx (strcat " E " xx)) (setq vy (strcat " N " yy)) (command "_.TEXT" "_J" "_ML" ne1 x-ht 0.0 (strcat vx " / " vy)) ) (setq tx-ht 0.5) (setq oldOsmode (getvar "OSMODE")) (setvar "osmode" 427) (setq ne1 (getpoint "\nPick point...")) (setvar "osmode" 0) (if (/= ne1 nil) (go_ne) (princ "\nInvalid Location !") ) (setvar "OSMODE" oldOsmode) (princ) ) This is the code I'm using. This is what it looks like (highlighted with the red bubble). I'm after one last thing, which is the 'line/point' which the coordinate is stating. As shown on the left. Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 Did you try my code? What command is it? Quote
Lee Mac Posted August 20, 2012 Posted August 20, 2012 'dimo' as found after the 'c:' in the function definition. Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 Right thanks for that. Would be possible for it to show only 9 digits and increase the spacing between x and y? Being a bit picky here, but would look neater if it all was on 1 line. X 430254889 Y 434123122 (random numbers) Quote
Lee Mac Posted August 20, 2012 Posted August 20, 2012 My program simply uses the DimOrdinate command with a custom text string. The string is constructed using the following expression: (strcat "X=" (rtos (car p)) "\\XY=" (rtos (cadr p))) The "\\X" places the subsequent text beneath the dimordinate dimension line. The units and precision are controlled by your settings of LUNITS & LUPREC; MSasu has already shown you how to modify rtos expressions. Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 My program simply uses the DimOrdinate command with a custom text string. The string is constructed using the following expression: (strcat "X=" (rtos (car p)) "\\XY=" (rtos (cadr p))) The "\\X" places the subsequent text beneath the dimordinate dimension line. The units and precision are controlled by your settings of LUNITS & LUPREC; MSasu has already shown you how to modify rtos expressions. I've no idea what you just wrote. Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 Possible to get the coordinates to 9 digits please? Edit: And make them all on 1 line? Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 Thanks for the Code Btw Lee Mac, but I'm quite happy with this one. It's a lot 'neater' just need the 'line' adding to it that's all. (defun c:ne( / oldOsmode e-x n-y ne1 prmt tx-ht vx vy x-ht xx yy ) (defun go_ne() ;(setvar "luprec" 2) (setq prmt (strcat "Enter TEXT HEIGHT<" (rtos tx-ht) ">: ")) (princ prmt) (setq x-ht (getreal)) (if (= x-ht nil) (setq x-ht tx-ht) ) (setq tx-ht x-ht) (setq e-x (car ne1)) (setq xx (rtos e-x 2 0)) (setq n-y (cadr ne1)) (setq yy (rtos n-y 2 0)) (tx-f) ) (defun tx-f() (setq vx (strcat " E " xx)) (setq vy (strcat " N " yy)) (command "_.TEXT" "_J" "_ML" ne1 x-ht 0.0 (strcat vx " / " vy)) ) (setq tx-ht 0.5) (setq oldOsmode (getvar "OSMODE")) (setvar "osmode" 427) (setq ne1 (getpoint "\nPick point...")) (setvar "osmode" 0) (if (/= ne1 nil) (go_ne) (princ "\nInvalid Location !") ) (setvar "OSMODE" oldOsmode) (princ) ) Quote
Lee Mac Posted August 20, 2012 Posted August 20, 2012 I've no idea what you just wrote. I would suggest you carefully read it again and at least put a little effort into trying to understand what the code is doing, instead of expecting everything to be handed to you on a plate. Quote
bharthts01 Posted August 20, 2012 Author Posted August 20, 2012 I would suggest you carefully read it again and at least put a little effort into trying to understand what the code is doing, instead of expecting everything to be handed to you on a plate. I have read it, I don't follow you. No need to get big headed. Quote
Lee Mac Posted August 20, 2012 Posted August 20, 2012 I have read it, I don't follow you. No need to get big headed. Which parts specifically do you not understand? If you do not understand my explanations, I would expect you to ask questions for clarification, not bluntly dismiss the explanation out of hand. I'll choose to ignore the immature comment while you reconsider which one of us is asking for help. 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.