Dynamic Block with Excel formula or automatic calculator inside

Dynamic Block with Excel formula or automatic calculator inside

Anonymous
Not applicable
2,310 Views
9 Replies
Message 1 of 10

Dynamic Block with Excel formula or automatic calculator inside

Anonymous
Not applicable

Hi 

I would like to create a dynamic block for a trickle ventilation that will tell me free area for airflow 

it has to stretch which I know how to do but same time I would like to implement a box that will calculate airflow according to stretched value 

is that possible 

I’m not sure if this has to contain excel formula like a external source or can cases be done inside of the block 

I will build a block with basic feature for stretch value but don’t know how to apply text box which will do the calc by trickle vent length * value for 1m length for example 12931mm square for Rw Airstrip Trickle Vent

0 Likes
Accepted solutions (2)
2,311 Views
9 Replies
Replies (9)
Message 2 of 10

steven-g
Mentor
Mentor

It will depend on the formula, but you can use a field inside your block that reads the area of a polyline and that field can also contain a 'field formula' that will perform a calculation on that area, that calculation should be able to contain any of the math functions used in the 'CAL' command (AutoCAD's built-in calculator). 

But it might take a bit of trial and error to get there. Attached is an example with just a simple rectangle that can be stretched and after a 'regen' the field use's the formula <AREA/2> and shows the results.

As a note, no LT cannot include excel results in a dynamic block.

0 Likes
Message 3 of 10

Anonymous
Not applicable
Hi,
Thank you very much for your advice. I'll check it afternoon and reply how it went.
Message 4 of 10

Anonymous
Not applicable

I've made a step forward but i stuck on other place. I work on metric units. I've checked if have a metric system set for my autocad and it is set for metric. I've clicked endered field and went for object and after for length unfortunately is only show me a result in inches i cannot change this anywhere. Also not sure how can i get result from length multiplied by 12931 that is value for 1m length 

when i chosen field for active length * 12931 i ended with ####

0 Likes
Message 5 of 10

steven-g
Mentor
Mentor

Can you post the .dwg version with the field you show in the image, it will be easier to see what is going wrong in the actual .dwg file an image doesn't give us any clue and it would just be guessing. And which polyline are you trying to get the formula to work with there are multiple polylines in your drawing?

Message 6 of 10

Anonymous
Not applicable

 Hi Steven,

 

Please find attached file. The blue line define length 

I would like to find this length in metric system and as a result airflow value. I wish i could talk live about this topic maybe i would be able to explain in better words what issue do i have. 

Anyway thank you very much for your help. 😉 Will be looking forward for your response. 

0 Likes
Message 7 of 10

Anonymous
Not applicable
the file has also been included on my previous post but here it goes again.
0 Likes
Message 8 of 10

steven-g
Mentor
Mentor
Accepted solution

The size shown in imperial is because you had 'architectural' units selected in your field, it should be 'decimal' then it will be correct. I also added a second field in your mtext that gives the formula, it does seem odd that you are taking a line length and calling it mm² as a length can only be linear and not area?

Attached is the file is this getting close.

PS. you do need to run 'regen' to update the fields after stretching the block.

Message 9 of 10

Anonymous
Not applicable
Accepted solution

Hi Steven,

 

I'll shortly check the file from yourself. I would have to use the line for command only because there is no area i can measure on the block. I do not know any other way to do this to see final result in even without units in mm. 

0 Likes
Message 10 of 10

Anonymous
Not applicable

Woooooow you are the Boss!!! Thank you very much!!!