Jump to content

Connect multiple block with line or polyline


taj250

Recommended Posts

HI Everyone

 

I am looking lisp for connecting multiple blocks with a line or polyline and also wants to create text like 1", 2" on the line.

I am creating a line and write text like 1" etc... it so much takes time because of so many blocks.

attaching an image kindly find below.

 

if you solve my problem. it is great thanks. I hope to wait for a good response from anyone.

 

best regards

hussain

attachement.jpg

Link to comment
Share on other sites

Do you have any lisp experience?

 

anywayz , have attached a sample for you to study / expand / improve...

[ATTACH]63348[/ATTACH]

gr. Rlx

 

dear gr.rlx

thank you so much for your reply, this lisp really nice and great thanks.

 

i am just beginner in lisp program, but that lisp wants to ask to create text and then increment also.

 

hussain

Link to comment
Share on other sites

A good programmer has 3 qualities : he's smart , lazy (and therefore creative) and has lots of practice ( / experience) . I bet you have already at least one of these qualities

 

 

:P

 

 

Have included text option specifically based on the image in your first post. Only you know what would be the right text height or layer / color so that's entirely up to you.

Taj250-Plus-Text.lsp

TAJ250-txt.png

Edited by rlx
Link to comment
Share on other sites

A good programmer has 3 qualities : he's smart , lazy (and therefore creative) and has lots of practice ( / experience) . I bet you have already at least one of these qualities

 

 

:P

 

 

Have included text option specifically based on the image in your first post. Only you know what would be the right text height or layer / color so that's entirely up to you.

 

HI RLX

 

THANK YOU SO MUCH, Yes I have included text option, anyway, i try this code for my drawing. again thanks for your effort :D:D

Link to comment
Share on other sites

  • 2 years later...

DEAR RLX

IT GONNA BE GREAT LISP CODE .I WAS RUNNING REAPETEDLY BUT FOLLOWING RESULT PIC APPERED AS IN FOLLOWED :

WHATS WRONG THAT?🙄😍 

GG.JPG

Link to comment
Share on other sites

can't tell from pic only. Code is couple of years old so have to do some digging... don't think its an osnap issue but I believe some values (text height etc) were hard coded so maybe there lies your answer. Not sure if I'll have much time cause my mom is probably going to die soon so if others want to respond , feel free to do so.

Link to comment
Share on other sites

  • 1 year later...

hi 

its great lisp. i am beginner in autolisp.. i am already try to understand this code but some  area i can't understand this.

kindly explain this code. which i red marked.

 

(defun Find-Y-Values ( %ss / yl )
  (mapcar
    '(lambda ( e / y)
       (setq y (cadr (getbip  e)) (if (null yl) (setq yl (list y)) (if
                                (vl-every '(lambda (n) (not (equal y n fuzz))) yl)(setq yl (cons y yl)))))
     %ss
  )
  (vl-sort yl '>) "what is the purpose this function here"
)

Link to comment
Share on other sites

On 2/21/2018 at 5:21 AM, rlx said:

A good programmer has 3 qualities : he's smart , lazy (and therefore creative) and has lots of practice ( / experience) .

😂 

Edited by ronjonp
Link to comment
Share on other sites

@thajmul : when building list with y values , no need to have double numbers so (1 3 2) instead of (1 3 1 2 2 3 3) , like a sort of unique or remove duplicates.

And the vl-sort just sorts the list so (1 3 2) becomes (1 2 3) or (3 2 1) depending on < or > , just try (vl-sort (list 1 3 2) '<) or (vl-sort (list 1 3 2) '>)

 

@ronjonp : I only shine in one quality , I'm super lazy. Still working on the rest... 😉

Link to comment
Share on other sites

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