Gordon Price
Usenet Archive
- Joined
- Jul 14, 2003
- Messages
- 203
- Reaction score
- 0
Let me just try this again 
I am trying to replace the standard Mtext command with one that handles office layers and styles and such. prefer this first batch of code at the vl-Catch-All-Apply handles a user cancel of the Mtext dialog rather nicely. However, when I undefine Mtext and include the code in my own C:Mtext routine, the vl-Catch-All-Apply line fails because there is no Mtext command, even with the period to run the original Acad commend. Am I doing something wrong in my code? Do I need to use a different approach for this? Any help out there on a New Years Eve Day?
Thanks in advance.
Happy New Year everyone!
Gordon
While I am at it, the other thing that I don't like is that I only show the user a standard getcorner rectangle, but I can't seem to get a Pause to work in a vl-Catch-All-Apply. Is there a better way to manage this so that I can get a proper Mtext box graphic when picking the Mtext corners?
(setq LE (entlast))
(initdia 1)
(setq PT1 (getpoint "Specify first corner: "))
(setq PT2 (getcorner PT1 "Specify second corner: "))
(vl-Catch-All-Apply 'vl-cmdf (list ".mtext" PT1 PT2))
(if (= (entlast) LE)(*ERROR* "Function cancelled"))
(setqLE (entlast))
(initdia 1)
(command ".mtext" pause "Height" TH)
(while (= (logand (getvar "CMDACTIVE") 1) 1)(command pause)) (if (= (entlast) LE)(*ERROR* "Function cancelled"))
I am trying to replace the standard Mtext command with one that handles office layers and styles and such. prefer this first batch of code at the vl-Catch-All-Apply handles a user cancel of the Mtext dialog rather nicely. However, when I undefine Mtext and include the code in my own C:Mtext routine, the vl-Catch-All-Apply line fails because there is no Mtext command, even with the period to run the original Acad commend. Am I doing something wrong in my code? Do I need to use a different approach for this? Any help out there on a New Years Eve Day?
Thanks in advance.
Happy New Year everyone!
Gordon
While I am at it, the other thing that I don't like is that I only show the user a standard getcorner rectangle, but I can't seem to get a Pause to work in a vl-Catch-All-Apply. Is there a better way to manage this so that I can get a proper Mtext box graphic when picking the Mtext corners?
(setq LE (entlast))
(initdia 1)
(setq PT1 (getpoint "Specify first corner: "))
(setq PT2 (getcorner PT1 "Specify second corner: "))
(vl-Catch-All-Apply 'vl-cmdf (list ".mtext" PT1 PT2))
(if (= (entlast) LE)(*ERROR* "Function cancelled"))
(setqLE (entlast))
(initdia 1)
(command ".mtext" pause "Height" TH)
(while (= (logand (getvar "CMDACTIVE") 1) 1)(command pause)) (if (= (entlast) LE)(*ERROR* "Function cancelled"))