Macro question


ACADuser
 Share

Recommended Posts

Trying to move more of my behind the seines work from ACAD to Chief and I guess I must learn Ruby.

 

What I need is a simple macro calculation. In the text I have:

Column Load %AreaPline%

x%Roof TL%TL= 5896#

The "Roof TL" is simply 40 in this case which I assume is a string 40.

What is necessary to multiply %AreaPline% by %Roof TL%  to get the total rounded to no decimals?

 

Would someone show me an example of what is needed for that to happen?

Or point me to an example someone posted?

 

Thanks

 

 

CAareas.JPG

Link to comment
Share on other sites

2 hours ago, solver said:

Where does Roof TL come from?

That's not all that needs to be answered.

  • %AreaPline% ???  would need to return the area of a PolyLine as a floating point value, not a text string
  • %Roof TL% ??? would also need to return a floating point value, not a text string.
  • x would need to be changed to *.  Ruby uses the following characters for calculations: +-/*

In any event, the load on that column would not be the result of the proposed calculation anyway.  Alan needs to consult an Engineer.

The Hip Beam has a reaction that is much more complicated to determine.

 

  • Upvote 1
Link to comment
Share on other sites

  

The Roof TL is entered into a text macro I created with a value of 40  (20# DL & 20# LL per sq ft)
Yes the area of the poly would return with the use of %AreaPline%
Yes again as the equation is (%AreaPline%*%Roof TL%)

I beg to differ Joe, the conventionally framed hip is more complex but a Hip Truss Assembly load is more like the polygon shown.
The only flaw if you will is that the beam load carrying

the girder truss creates a point load the is not quite evenly distributed on the Beam.
But the COLUMN load is very close to real.
If it was conventional framing the HIP Truss load is like the picture in this post and the column load is P plus the adjoining triangles.

Ignore framing in the picture below.

CAHipR.JPG

Link to comment
Share on other sites

Thanks Joe.

My work is just in the text object & no real macro on my part because I'm clueless.

See attached

Using Your AreaPline macro for the area which is area.round(1).

My macro is just a value of 40

I don't know how to multiply them in Ruby.

Having only a 2 day work week this week but will return this weekend so I can explore Ruby further then.

I just thought it would be a simple procedure for someone familiar with Ruby.

The equation would be something like (%AreaPline%*%Roof TL%)

Thanks again.

CA-Area1.JPG

CA-Area2.JPG

Link to comment
Share on other sites

5 hours ago, Joe_Carrick said:

You can't just do this in a text box - it needs to be in the Label of the Polyline.

Actually, you can do it in a text box with an arrow connected to the Polyline - but the macro would need to be "referenced" and maintaining the connection of the arrow can be difficult.

Labels are best.

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share