alanjt Posted June 19, 2010 Posted June 19, 2010 Nope........ OK, I'll just ask. What is it? Did you come up with some way to mimic GrRead? Quote
Lee Mac Posted June 19, 2010 Posted June 19, 2010 You're gonna kick yourself lol Simples: (defun c:ml2 ( / *error* vl ov LastEntity ent ss ) ;; © Lee Mac ~ 19.06.10 (defun *error* ( msg ) (mapcar 'setvar vl ov) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (setq vl '("CMDECHO" "PEDITACCEPT" "QAFLAGS") ov (mapcar 'getvar vl)) (setq LastEntity (entlast)) (command "_.mline") (while (= 1 (logand 1 (getvar 'CMDACTIVE))) (command pause) ) (if (not (equal LastEntity (setq ent (entlast)))) (progn (mapcar 'setvar vl '(0 1 5)) (vl-cmdf "_.explode" ent "") (setq ss (ssadd)) (mapcar '(lambda ( e ) (ssadd e ss)) (LM:EntnexttoEnd ent)) (vl-cmdf "_.pedit" "_M" ss "" "_J" "" "") ) ) (mapcar 'setvar vl ov) (princ) ) (defun LM:EntnexttoEnd ( e ) (if (setq e (entnext e)) (cons e (LM:EntnexttoEnd e)) ) ) Quote
alanjt Posted June 19, 2010 Posted June 19, 2010 COMMAND!?!!?! You cheater! LoL That's hilarious. A+ You're gonna kick yourself lol Simples: (defun c:ml2 ( / *error* vl ov LastEntity ent ss ) ;; © Lee Mac ~ 19.06.10 (defun *error* ( msg ) (mapcar 'setvar vl ov) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (setq vl '("CMDECHO" "PEDITACCEPT" "QAFLAGS") ov (mapcar 'getvar vl)) (setq LastEntity (entlast)) (command "_.mline") (while (= 1 (logand 1 (getvar 'CMDACTIVE))) (command pause) ) (if (not (equal LastEntity (setq ent (entlast)))) (progn (mapcar 'setvar vl '(0 1 5)) (vl-cmdf "_.explode" ent "") (setq ss (ssadd)) (mapcar '(lambda ( e ) (ssadd e ss)) (LM:EntnexttoEnd ent)) (vl-cmdf "_.pedit" "_M" ss "" "_J" "" "") ) ) (mapcar 'setvar vl ov) (princ) ) (defun LM:EntnexttoEnd ( e ) (if (setq e (entnext e)) (cons e (LM:EntnexttoEnd e)) ) ) Quote
alanjt Posted June 19, 2010 Posted June 19, 2010 Not cheating... just using my initiative Hey, many times over, I've used the command because it just made more sense for functionality. I was just teasing. The worst part is, I now remember helping someone several months ago, using MLine, doing something very similar. I was going to post my example (didn't realize I forgot to last night), but it's rather pointless when you've posted a nice simple solution. The only claim I have is that I didn't use any command calls or VLA. Never thought Lee would stoop that low. That's what I was thinking. I've never known a person that chastised others for the use of command. Nah, in truth, when the usage of command is avoidable, it should be. However, in this case, I think it was right on track. Especially since you could get real fancy and utilize MLine styles. Quote
The Buzzard Posted June 19, 2010 Posted June 19, 2010 Hey, many times over, I've used the command because it just made more sense for functionality. I was just teasing. The worst part is, I now remember helping someone several months ago, using MLine, doing something very similar.I was going to post my example (didn't realize I forgot to last night), but it's rather pointless when you've posted a nice simple solution. The only claim I have is that I didn't use any command calls or VLA. That's what I was thinking. I've never known a person that chastised others for the use of command. Nah, in truth, when the usage of command is avoidable, it should be. However, in this case, I think it was right on track. Especially since you could get real fancy and utilize MLine styles. He really must be bored if he was willing to cross that threshold. Quote
alanjt Posted June 19, 2010 Posted June 19, 2010 He really must be bored if he was willing to cross that threshold. Agreed. Quote
Lee Mac Posted June 19, 2010 Posted June 19, 2010 It seemed just too much work to replicate its behaviour for the sake of avoiding a command call.. I stick to what I say - command calls aren't the way forward, but in situations such as these, I think it is justified. Quote
alanjt Posted June 19, 2010 Posted June 19, 2010 It seemed just too much work to replicate its behaviour for the sake of avoiding a command call.. I stick to what I say - command calls aren't the way forward, but in situations such as these, I think it is justified. Nah, in truth, when the usage of command is avoidable, it should be. However, in this case, I think it was right on track.................... Quote
BIGAL Posted June 20, 2010 Posted June 20, 2010 Now that you have the code for two lines its not hard to add extra wall lines a typical wall here is 4 lines brick outside timber inside, at one stage I also had as many lines as you wanted just keep adding widths. Change wall thickness's on the fly trim and join multi walls. Quote
Tharwat Posted June 20, 2010 Author Posted June 20, 2010 Now that you have the code for two lines its not hard to add extra wall lines a typical wall here is 4 lines brick outside timber inside, at one stage I also had as many lines as you wanted just keep adding widths. Change wall thickness's on the fly trim and join multi walls. Thanks, But why didn't you add yours you might have something special did you .. ? Mr Buzzard helped with the codes very well . Regards, Tharwat Quote
Tharwat Posted June 20, 2010 Author Posted June 20, 2010 Code is added in an earlier post I think to use Autocad mline is better than ml2 ,which has posted earlier, So what is the porpose of the Lisp since that it dose not acheive any bit. regards Quote
Lee Mac Posted June 20, 2010 Posted June 20, 2010 I think to use Autocad mline is better than ml2 ,which has posted earlier, So what is the porpose of the Lisp since that it dose not acheive any bit. As far as I understand it, the original request was for code that would create the representation of an MLine, but using two polylines. The code I posted does exactly this. If you are not satisfied with the code, then you will have to come up with something yourself. In any case, I am fed up with the tone of your posts in many threads, and will have no further communication with you. Quote
alanjt Posted June 20, 2010 Posted June 20, 2010 I think to use Autocad mline is better than ml2 ,which has posted earlier, So what is the porpose of the Lisp since that it dose not acheive any bit.regards Let's look at the thread title: Any function to draw Lines instead of Mline To me, that says the desired result is to mimic the functionality of MLine, but have a return of lines of polylines. Multiple version were posted (which is why I didn't bother going back and posting mine. As far as I understand it, the original request was for code that would create the representation of an MLine, but using two polylines. The code I posted does exactly this. If you are not satisfied with the code, then you will have to come up with something yourself. In any case, I am fed up with the tone of your posts in many threads, and will have no further communication with you. I'm with Lee 100% on this one. Not cool. 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.