Jump to content

Recommended Posts

jkoll66

Hi all, I have been tasked with coming up with a dynamic block that is for a chute.

 

 

It is a simple rectangle that I've added some attributes to and a field within one of the attributes. What I need the formula to do is calculate the angle of the chute based on user input for the upper height and the lower height (rise) and "Distance 1" (run) and then return the answer in the field.

 

 

It returns the correct angle on insertion, however, when I change any of the values and Regen the result is incorrect.

 

 

In addition, I would like the "Angle" attribute to not show in the dialog box when inserted. Is that possible?

 

 

Thanks.

Chute plan view.dwg

Share this post


Link to post
Share on other sites
Ski_Me

Ok so what formula are you using because your trying to find an angle using x and y coordinates. This would be a trigonometric function which you can't do with a formula in AutoCAD. If you look at the formulas you can use they are limited to average, sum, count, and cell. Just the basic add, subtract, multiply, and divide. If look at the Auto Desk Exchange there is a app you can get that will give you those features to do SIN COS and TAN but you have to pay for it and it's not cheap. What you could do is find the cos by dividing the y value by the hypotenuse which is just simple math then you could use the law of cosines to solve for the angle. trig-cosine-law-c.gif it will take a lot of work but doable I think. You might be better off looking into using a lookup instead of a attribute.

Share this post


Link to post
Share on other sites
jkoll66

I was finally able to get it to work. Not sure what I did to correct the issue. I just started over from scratch. It looks the same as what I had. I may have selected "none" this time for units in the formula.

 

 

Anyway, AutoCAD can do formulas. I found this site that lists arithmetic functions that can be used with AutoCAD http://www.cadforum.cz/cadforum_en/qaID.asp?tip=6381.

 

 

Attached is the working block.

 

 

Thanks

Chute plan view.dwg

Share this post


Link to post
Share on other sites
Ski_Me

I cant get it to work what am I doing wrong. I didn't realize AutoCAD supported all those other functions. Kinda nice to know.

Share this post


Link to post
Share on other sites
jkoll66

Did you "Regen" after changing the values or stretching? Also, make sure your units are inches and that you are in "Architectural" mode.

Share this post


Link to post
Share on other sites
Ski_Me

Ok I got it to work. I was thinking that the angle was wrong but then remembered it's rise over distance that defines the angle not the distance of the rise if that makes sense. It took a few tries to get it to work but I works like you said.

Share this post


Link to post
Share on other sites
jkoll66

Good, I'm glad you got it to work. I was starting to worry I still had something wrong!:D

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