Adding Formula in Text Override for Dimension

Adding Formula in Text Override for Dimension

Anonymous
Not applicable
4,074 Views
4 Replies
Message 1 of 5

Adding Formula in Text Override for Dimension

Anonymous
Not applicable

Guys,

 

Is it possible to add a formula in the text override for a dimension?

 

In a project, I have to add dimenions to a roof plan then add square inch in each dimension using text override.

 

Hopefully you can help with that.

 

Regards,

 

Justin

 

 

0 Likes
4,075 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... 

Is it possible to add a formula in the text override for a dimension?

 

In a project, I have to add dimenions to a roof plan then add square inch in each dimension using text override.

....


Yes, something like that can be done, but explain a little more....  There's no Dimension type that shows area [they're all linear or one-directional in one way or another, or angular ], but square inches are a matter of area, so what does it mean to "add square inch in each dimension"?  For a rectangular area, the square inches of it would be the product of two Dimensions along perpendicular edges, so which do you add square inches to?  Or am I misunderstanding?

Kent Cooper, AIA
0 Likes
Message 3 of 5

scot-65
Advisor
Advisor
As Kent said - Dimensions are linear and you want to add a square inch?
Do you really mean to not only show foot-inch but inches as well?
If "Yes", look into all the "Alternate Units" settings.
If simply adding an "override" look into adding as a "suffix" (DIMPOST) instead.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 4 of 5

Anonymous
Not applicable
What I had to do is add dimensions around edges of the roof then manually add a specific format in the Text Override in the property of each dimension.

I.E. The dimension on a edge of the roof is 10'-8". The square inch of that dimension is figured out by this formula: (10 x 12 + 8) x 9.7 / 12 = 103.47. Once I get that number, I manually insert it in the Text Override property of the dimension by writing that specific format: <>\P103.47 SQ IN OF SOFFIT VENTS.

Now I am wondering if I could insert a formula in the Suffix in the Dimstyle so it'll automatically show the square inch in the dimension once I add it to edges of the roof.

Makes sense?

Justin

P.S. The 9.7 is a number we used to determine how many square inch of a specific soffit vent we will need.
0 Likes
Message 5 of 5

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:
....
I.E. The dimension on a edge of the roof is 10'-8". The square inch of that dimension is figured out by this formula: (10 x 12 + 8) x 9.7 / 12 = 103.47. Once I get that number, I manually insert it in the Text Override property of the dimension by writing that specific format: <>\P103.47 SQ IN OF SOFFIT VENTS.

Now I am wondering if I could insert a formula in the Suffix in the Dimstyle ....

In a quick trial, Dimension Style suffixes don't seem to be able to handle AutoLisp formulas [though there may be some other way].  But this works for me:

 

(setq obj (vlax-ename->vla-object YourDimensionEntityName)

(vla-put-TextOverride obj (strcat "<>\\P" (rtos (/ (* 9.7 (vla-get-Measurement obj)) 12) 2 2) " SQ IN OF SOFFIT VENTS"))

 

Bear in mind that if the dimensions are to the outer edges of a roof, a hip roof under which the soffiting turns the corner will give you areas that overlap, so the total will be more than actually needed [unless you dimension the outer edge on one side of the corner and the back edge of the soffiting on the other side].

Kent Cooper, AIA
0 Likes