Author Topic: Another Qleader and block  (Read 3017 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Another Qleader and block
« on: December 22, 2004, 02:40:05 PM »
The following routine allows me to use a single line qleader. What is required to make it have the horizontal tail before the text?


(defun c:LEADHEX (/ pb1 pt1 pt2 lay scl ply agl rtd ang)
  (setq pb1 (getvar "PICKBOX"))
  (setvar "CMDECHO" 0)
  (setq pt1 (getpoint "\nFrom Point: ")
        pt2 (getpoint pt1 "\nTo Point: ")
        lay (getvar "CLAYER")
        scl (getvar "DIMSCALE")
        ply (* scl 0.15550)
        agl (angle pt1 pt2)
        rtd (/ 180 pi)
        ang (* rtd agl)   )
  (command "COLOR"  "bylayer")
  (setq pt0 (polar pt2 (angle pt2 pt1) ply))
  (command ".POLYGON" "6" PT2 "I" PLY)
  (setq ent (entlast))
  (command ".qleader" "_non" pt1 "_nea" pt0 ^c ^c);  create leader only
  (entdel ent)
  ;(command "INSERT" "meinarw" pt1      scl      ""       ang)  
  (setq att (getstring "\nEquip_number: "))
  (command "INSERT" "MEP-Text-LFTKeyNT1" pt2 scl "" "" att)
  (command "SETVAR" "PICKBOX" pb1)
  (setvar "CMDECHO" 1)
  (pickbox "4")
  (princ)
)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Another Qleader and block
« Reply #1 on: December 22, 2004, 03:57:36 PM »
TJ
Did the routine that Mark or I work for your previous request?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Anonymous

  • Guest
Another Qleader and block
« Reply #2 on: December 22, 2004, 04:15:51 PM »
It worked great.....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Another Qleader and block
« Reply #3 on: December 22, 2004, 04:16:10 PM »
From the look of this code I'd say you have copied the qleader command from
the code I posted in your last thread and pasted it into this routine.
Adding a third point is no big deal. In fact I just updated this code, but
I'm surprised you did not acknowledge mine or Mark's efforts.
Code: [Select]
(defun c:leadhex (/ pb1 pt0 pt1 pt2 pt3 lay scl ply agl rtd ang)
  (setq pb1 (getvar "PICKBOX"))
  (setvar "CMDECHO" 0)
  (setq pt1 (getpoint "\nPick First of 3 Points: ")
        pt2 (getpoint pt1 "\nPick 2nd Point: ")
        pt3 (getpoint pt2 "\nPick 3rd Point: ")
        lay (getvar "CLAYER")
        scl (getvar "DIMSCALE")
        ply (* scl 0.15550)
        agl (angle pt1 pt2)
        rtd (/ 180 pi)
        ang (* rtd agl)
  )
  (command "COLOR" "bylayer")
  (setq pt0 (polar pt3 (angle pt3 pt2) ply))
  (command ".POLYGON" "6" pt3 "I" ply)
  (setq ent (entlast))
  (command ".qleader" "_non" pt1 "_non" pt2 "_nea" pt0 ^c ^c) ; create leader only
  (entdel ent)
  (setq att (getstring "\nEquip_number: "))
  (command "INSERT" "MEP-Text-LFTKeyNT1" pt3 scl "" "" att)
  (command "SETVAR" "PICKBOX" pb1)
  (setvar "CMDECHO" 1)
  (pickbox "4")
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
Another Qleader and block
« Reply #4 on: December 23, 2004, 09:43:48 AM »
My apologies for not giving credit where credit is due. It was never my intention to not give credit but rather old age and a loack memory. My apologies to both of you. I am very grateful for the assistance you both have proivided.


Thanks you

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Another Qleader and block
« Reply #5 on: December 23, 2004, 10:46:08 AM »
TJ
I wasn't looking for credit, just a simple "That Did It" would do.
The thread was left hanging in my opinion. You left me wondering that's all.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.