Jump to content

Dynamic Block creation help


robwell

Recommended Posts

Hello all, I need some help in creating a dynamic block to stretch with an array. I cannot seem to find the correct combination for the block. I have worked on this with many iterations, but mine are not working at all. I started with an example of one already created, but my manipulations to the example do not work either. So in this image attached is what I am looking for.

 

This should be a single line array.

The object is a 3/16" diam circle, begin at y=1/2", x=1.75" from insert point. The end array object will be y=1/2", y=-1.75" from the stretch point end.

Intermediate array objects should divide equally along the line with a max spacing = 16"

It would be helpful if the stretch point could be polar stretch to allow for rotation when stretching and a flip feature along the x-axis.

The min/max dimension is not necessary, but would be helpful to transition to a single diam circle centered on the span when less than 7".

(The rectangle pictured is for layout purposes)

 

I hope this is not too much to ask for help with this block, but I have exhausted my brain's ability to figure this out.

 

 

Thank you all for any and all help.

 

image.thumb.png.ee07c3753aac812b3b3786543aca06f8.png

 

image.thumb.png.46865689cb3ce2882886f645805b173d.png

Link to comment
Share on other sites

10 hours ago, BIGAL said:

If you don't want a block then a lisp will do it.

 

If you know how to create a lisp that will accomplish this same task, then I am all ears. But it has to be insert-able into and stretchable/rotate able in any cad file.

 

I can't imagine the code that would have to be written for that. I'm not well versed at writing lisp codes. Basically read that as I have no clue how to do that.

Link to comment
Share on other sites

You would just pick two points this gets distance and you have rules like end offset. The auto dimension would be based on pick direction so know which way is outside. Top is L-R bot R-L and so on.  For vertical X & Y would be reversed.

 

image.png.fb02778993ff85150c12341a78f971be.png

 

Multi GETVALS.lsp

repeat object along line.lsp

Edited by BIGAL
Link to comment
Share on other sites

BIGAL - Thank you for this. But it only works for the L-R direction for me. See image below for example. I tried reversing the numbers for vertical, but you can see what happened in the image. All selection points were at the end of the lines drawn, L-R, R-L, T-B, B-T, but the placement of the objects were not setting correctly.

 

Also, I need something that will handle angled placement as well. Not sure a lisp is going to be practical if I have to enter the differing numbers every time I have to change directions. Seems like a Dynamic Block would eliminate the data entry.

 

image.thumb.png.6eb5692ff2e16c0638a7c1ddb6794d05.png

Link to comment
Share on other sites

That was the 1st version and found an error in the code I have updated the code and it works for any angle. Just think of L-R etc this dictates the side the circles are drawn on.

 

Edited by BIGAL
Link to comment
Share on other sites

The object along a line lisp says unavailable, so I can't download the update.

 

I have another hiccup though, now. I am going to really need this in a dynamic block because we have employees in our office that do not have the full version of AutoCAD. The Lite version does not allow the use of lisps.

 

So if anyone can help in a Dynamic Block of this nature, I would be grateful.

Link to comment
Share on other sites

If you have excel then look at using that as your programming friend you can do a command column of the commands required. Steven-g any comment ?

 

Briscad comes to mind you need to look at the seconds to do this task versus manual how long work out how many hours equal the cost of alternative software.

 

I did ask do you want it dimensioned as well.

repeat object along line.lsp

Link to comment
Share on other sites

Just tried the updated lisp and it works perfectly. Thank you. I can make it work for those that have a full version of CAD.

 

It does not need to be dimensioned. 

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