Jump to content

Recommended Posts

Posted
Nope........

OK, I'll just ask. What is it? Did you come up with some way to mimic GrRead?

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • Tharwat

    11

  • alanjt

    9

  • Lee Mac

    8

  • The Buzzard

    4

Top Posters In This Topic

Posted Images

Posted

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))
 )
)

Posted

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))
 )
)

Posted

Never thought Lee would stoop that low.

Posted
Not cheating... just using my initiative :P

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. :lol: 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.

Posted
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. :lol: 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.

Posted
He really must be bored if he was willing to cross that threshold.

:lol: Agreed.

Posted

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.

Posted
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.
...................
Posted

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.

Posted
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

Posted
Code is added in an earlier post :huh:

 

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

Posted
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.

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...