Author Topic: Help: id mleader lisp  (Read 626 times)

0 Members and 1 Guest are viewing this topic.

mhy3sx

  • Newt
  • Posts: 120
Help: id mleader lisp
« on: May 29, 2023, 11:44:37 AM »
Hi, I am using this code to id coordinates. This code use leader and mtext. Is it possible to use mleader ? I don't want the line and mtext to be separate

Code - Auto/Visual Lisp: [Select]
  1. (defun c:idd()
  2.   (setq lup(getvar "luprec"))
  3.   (setvar "luprec" 3)
  4.   (setq zin(getvar "dimzin"))
  5.   (setvar "dimzin" 0)
  6.   (setvar "cmdecho" 0)
  7.  
  8.   (setq po (getpoint "Pick First Point:"))
  9.   (setq po2 (getpoint po "Pick Second Point:"))
  10.  
  11. (setq xp (strcat "N " (rtos (cadr po) 2 3)))
  12. (setq yp (strcat "E " (rtos (car po) 2 3)))
  13. (command "leader" po po2 "" yp xp "")
  14. )
  15.  

Thanks

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Help: id mleader lisp
« Reply #1 on: May 29, 2023, 01:45:31 PM »
If you want the two strings to inline then just remove the "\\P" from the command.
Code - Auto/Visual Lisp: [Select]
  1. (command "Mleader" po po2 (strcat yp "\\P" xp))
  2.  

mhy3sx

  • Newt
  • Posts: 120
Re: Help: id mleader lisp
« Reply #2 on: May 29, 2023, 04:02:25 PM »
Thanks Tharwat