Dynamic block distance formula

Dynamic block distance formula

Anonymous
Not applicable
3,990 Views
14 Replies
Message 1 of 15

Dynamic block distance formula

Anonymous
Not applicable

Hi Guys,

 

My first post. I am an engineering student with a bit of a drawing background and need help on some blocks I've used and am trying to build.

 

It is essentially for drainage. I would like to have 'nodes' that measure a distance between two points. (helpful if they did not print). Once this distance is acquired I would like to incorporate it into a formula so that it can work out the fall. This would involve the formula reading the two invert levels from attributes. Hopefully this makes sense.

 

Warm regards

 

Daniel

0 Likes
Accepted solutions (1)
3,991 Views
14 Replies
Replies (14)
Message 2 of 15

h_s_walker
Mentor
Mentor

Use a dimension and stick it on a no plot layer. You can use that dimension in a formula field.

 

See the attached drawing.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 3 of 15

Anonymous
Not applicable

Will it form part of the block though?

0 Likes
Message 4 of 15

h_s_walker
Mentor
Mentor

I've updated my previous post with a drawing

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 5 of 15

Anonymous
Not applicable

I will add a drawing to describe what I mean

0 Likes
Message 6 of 15

h_s_walker
Mentor
Mentor

I've updated the block. I believe it works how you want it to

 

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 7 of 15

Anonymous
Not applicable

Yes 90% of the way there. I did not know you could put fields within the formulae. I'd imagine that opens many doors for me now. The only bit I don't want showing is the line and arrows between the inverts and also the text that auto updates. (the one I have to regen for is perfect as I will use that as a label and reference for other formulae.

 

Thank you so much for your help.

0 Likes
Message 8 of 15

h_s_walker
Mentor
Mentor

Updated.

 

The two points you can see will not plot. They're on defpoints layer. I put them on to show where the start of the block is (the left hand point) and where you need to stretch from (the right hand point)

 

I've also put two visibility states on there you can't select them using the block. One is just to hide the dimension and the line.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 9 of 15

h_s_walker
Mentor
Mentor

I've updated the block a bit more. The dimension is removed.

 

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 10 of 15

h_s_walker
Mentor
Mentor

The formula is not working correctly give me a little while and I'll sort it out.

 

It's not accepting the input values. I'm not too sure how to get it to accept them.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 11 of 15

h_s_walker
Mentor
Mentor
Accepted solution

Block has been updated. Had to do a bit more research to find out how to get the formula working correctly.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 12 of 15

Anonymous
Not applicable

Thank you so much. One last thing. Say I wanted to put an x for instance or a circle in place of the dots or nodes how would I do that. The LH one would be fine I would move with the base point. The RH one would need to move with the stretch, so would I add the object to the movement of the stretch.

0 Likes
Message 13 of 15

Washingtonn
Collaborator
Collaborator

@Anonymouswrote:

Hi Guys,

 

My first post. I am an engineering student with a bit of a drawing background and need help on some blocks I've used and am trying to build.

 

It is essentially for drainage. I would like to have 'nodes' that measure a distance between two points. (helpful if they did not print). Once this distance is acquired I would like to incorporate it into a formula so that it can work out the fall. This would involve the formula reading the two invert levels from attributes. Hopefully this makes sense.

 

Warm regards

 

Daniel


Attached is a block and lisp routine I have used in the past to calculate inverts for entire piping systems. Place the block in a drawing and then run the lisp, selecting the first block and then placing more blocks at the other points - the ID of the block references the previous block.

 

After placing the blocks, I export into excel (as a .CSV file) and let it do ALL of the calculations - it gives me the elevation at every block location based on each block's location, pipe size, segment slope and vertical change (rise/drop) desired.

 

The information is then updated in AutoCAD for each block. If interested and as time allows, I could post a short video showing the block and lisp in action.

0 Likes
Message 14 of 15

h_s_walker
Mentor
Mentor

PDMODE  changes the display of a point. See the link below. However you can add a couple of lines yourself if you don't want to change the point mode, just add the right hand ones to the polar stretch.

 

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoC....

 

I've attached a drawing with a cross at each end of the stretch instead of a point

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 15 of 15

Anonymous
Not applicable

Thank you. Never used LISP. I will look into this as soon as I get a chance.

0 Likes