Author Topic: Macro to Lsp  (Read 1270 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2606
  • I can't remeber what I already asked! I need help!
Macro to Lsp
« on: May 19, 2016, 10:02:48 AM »
Guys
I am playing around with trying to create a simple routine from a macro I use a lot. I was thinking it would be easier to be typed in command opposed to a button I have to go find and push.

Code: [Select]
-la;s;C_NOTES;;CMLEADERSTYLE;"L80 CIRCLE WITH MTEXT";MLEADER;NEA;
Code: [Select]
-la;s;C_NOTES;;CMLEADERSTYLE;"L80 Leader Text Straight";MLEADER;NEA;
I have an example I am trying to follow, but I can not seem to get the OSNAP portion to work.

Code: [Select]
(defun C:mlo ()
(setvar "cmdecho" 0)
(setq CL (getvar "clayer")
) ;_ end of setq

(command "-LAYER" "M" "C_NOTES" "C" "82" "C_NOTES" "")
(setvar "cmleaderstyle" "L80 Circle")
(command ".mleader" pause)
(setvar "clayer" CL)
(princ)
)
(setvar "cmdecho" 0)

(princ)


(defun C:mlt ()
(setvar "cmdecho" 0)
(setq CL (getvar "clayer")
) ;_ end of setq

(command "-LAYER" "M" "C_NOTES" "C" "82" "C_NOTES" "")
(setvar "cmleaderstyle" "L80 Leader Text Straight")
(command ".mleader" pause)
(setvar "clayer" CL)
(princ)
)
(setvar "cmdecho" 0)

(princ)
Civil3D 2020

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Macro to Lsp
« Reply #1 on: May 19, 2016, 11:10:00 AM »
(command ".mleader" "_Near" pause)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MSTG007

  • Gator
  • Posts: 2606
  • I can't remeber what I already asked! I need help!
Re: Macro to Lsp
« Reply #2 on: May 19, 2016, 03:49:57 PM »
Sorry for not getting back. Thank you!
Civil3D 2020

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Macro to Lsp
« Reply #3 on: May 19, 2016, 04:11:22 PM »
Sorry for not getting back. Thank you!
:)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC