Jump to content
CADZealot

Align Blocks to selected line orientation

Recommended Posts

CADZealot

Really sorry for the delay,
Thank you so much dlanorh and Bigal .This awesome, working perpectly.you saved me. 
If I want to Align the Blocks as shon in image at the middle of the line (Either Above or Blow the Line), what i have to edit in your program.

image.png.24353cc1ff66a836ec8b3fb5c140679d.png


Could you please tell me, so that i can learn something in lisp.

 

Thank you so much for your explanation and code.

Share this post


Link to post
Share on other sites
dlanorh
6 hours ago, CADZealot said:

Really sorry for the delay,
Thank you so much dlanorh and Bigal .This awesome, working perpectly.you saved me. 
If I want to Align the Blocks as shon in image at the middle of the line (Either Above or Blow the Line), what i have to edit in your program.

image.png.24353cc1ff66a836ec8b3fb5c140679d.png


Could you please tell me, so that i can learn something in lisp.

 

Thank you so much for your explanation and code.

 

It's not as simple as changing something, you have to add a lot more. Are you after something that does all three, Above Middle, Below Middle and Ends?

Share this post


Link to post
Share on other sites
BIGAL

Please feel free to use this as choice. Note 4 choices covering other option.

 

(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (= but nil)(setq but 1))
(setq ans (ah:butts but "v"  '("Choose" "Above Middle" "Below Middle" "Above Ends" "Below Ends"))) ; ans holds the button picked value

image.png.5be7386e21a89afa822ce2c8ef743370.pngMulti radio buttons.lsp

Share this post


Link to post
Share on other sites
CADZealot
Quote

It's not as simple as changing something, you have to add a lot more. Are you after something that does all three, Above Middle, Below Middle and Ends?

Okay,Can we do with separate command/Lisp, actually if the line will be short i cant align the blocks to start and end of the line, in that case i need to align as per the image.

I know i'm asking too much things, but atleast i can learn something using your codes.

image.png.fbc6c94228803839812d42840f5e1238.png

 

Thanks.

 

 

Share this post


Link to post
Share on other sites
CADZealot
6 hours ago, BIGAL said:

Please feel free to use this as choice. Note 4 choices covering other option.

 


(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (= but nil)(setq but 1))
(setq ans (ah:butts but "v"  '("Choose" "Above Middle" "Below Middle" "Above Ends" "Below Ends"))) ; ans holds the button picked value

image.png.5be7386e21a89afa822ce2c8ef743370.png Multi radio buttons.lsp 2.47 kB · 10 downloads

Thanks Bigal, 

It seems like will work, but i can't find any command (c:***) inside the lisp. can you please tell me the command to run this lsp.

 

Thanks

Share this post


Link to post
Share on other sites
dlanorh
4 hours ago, CADZealot said:

Okay,Can we do with separate command/Lisp, actually if the line will be short i cant align the blocks to start and end of the line, in that case i need to align as per the image.

I know i'm asking too much things, but atleast i can learn something using your codes.

image.png.fbc6c94228803839812d42840f5e1238.png

 

Thanks.

 

 

 

It can all be in one lisp, it just needs a lot more code and a way of choosing the option. We can call the options "Above" "Below" Over" and "Ends"

Share this post


Link to post
Share on other sites
CADZealot
Quote

It can all be in one lisp, it just needs a lot more code and a way of choosing the option. We can call the options "Above" "Below" Over" and "Ends"

Yes, that would be good 😀

Share this post


Link to post
Share on other sites
BIGAL

To Cadzealot like Dlanorh we can call the options "Above" "Below" Over" and "Ends" the idea is that the dcl is a library function that can be used in any code. It loads the lisp file and creates a DCL on the fly for a more visual input. You just change the 3rd line list 1st item is heading, than as many as you want '("Yes or No" "Yes" "No")

 

If you want to run save "Multi radio buttons.lsp" to a location in your Autocad support paths. Or drag and drop onto Autocad 1st from explorer then paste the 3 lines to the command line.

you should see what you picked "Above" on command line or type  !ans on command line.

 

(setq ans (ah:butts but "v"  '("Choose" "Above Middle" "Below Middle" "Above Ends" "Below Ends" "Above-Below")))

image.png.c4fef1bcc0229dc6b725e0c3f648b3e4.png

Edited by BIGAL

Share this post


Link to post
Share on other sites
dlanorh
On 03/12/2019 at 13:49, CADZealot said:

Yes, that would be good 😀

 

OK. Probably won't have anything before the end of the week as I'm away on site visits at the moment. I can code but not test.:cry:

Share this post


Link to post
Share on other sites
CADZealot
14 hours ago, dlanorh said:

 

OK. Probably won't have anything before the end of the week as I'm away on site visits at the moment. I can code but not test.:cry:

Okay Dlanorh, if you give the code i can test that.🙂

Share this post


Link to post
Share on other sites
dlanorh
20 hours ago, CADZealot said:

Okay Dlanorh, if you give the code i can test that.🙂

 

Attached is minimally tested Lisp. This makes use of the dynamic prompt to display the options "Above" "Below" "On" "Ends". I have substituted "On" for "Over" as Over could be construed as above. It will only work with your blocks and the block scale is 1. I will try to tweak this to work with different block scalings, but 1 was the first step.

AB2L-V3.lsp

Share this post


Link to post
Share on other sites
CADZealot

This is Amazing... working perfectly...

Thank you so much:celebrate::celebrate:

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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