Jump to content
Developer Wiki and Function Reference Links ×

2D Area as a Text symbol


ArrigoB

Recommended Posts

Hello,

 

I just recently switched over to Marionette from Grasshopper.

This is probably really easy but im having troubles with it. How can I get the 2D area of a polygon and display is as a text in m2? I think im on the right path with the "Get 2D Area" but I don't know how to convert that info to a text symbol.

 

Thanks in advance for the help.

 

Arrigo Burgener

Screenshot 2022-11-15 at 20.36.09.png

Link to comment

Try using the STR node to convert the number returned by Get 2D Area into a string that the Text node can handle.

 

You may have to add the unit marks "manually" as I don't know if a data type of nArea carries unit information or not.

 

And depending on the units setting of your drawing you may need to do the math to convert to Square Meters before you convert to a string.

  • Like 1
Link to comment

The Text Node converts the input in a string. That should not be the issue. Try the following:

1. The Text is place by coord (0,0) you should found your text oject there. Get 2D Center or BBox Center to place your text in the middle of the poly and intert the resulting point into the text Node
2. Try to connect a prefix. Even if you do not have an area it should return the prefix

There is a great DataTag Tool, that would tag your polys automatically with an area. Maybe there is no script necessary.

  • Like 2
Link to comment

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

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