Any simple graph to rotate group of texts in a view?

Hello Dynamoers, any simple graph to rotate group of texts in a view?
I wrote a code block action but it is bit confusing that there is no constant position for 0°,90°,180°,270° etc , it is varying each time. So iam unable to assume which is the correct angle i require. My texts in a view is slightly rotated around 10°, i want all of them to be rotated in to 0°. Can anyone suggest a simple graph for that?
I know there is “TextNote.ByLocation” node which seems much complicated, and each string data need to be written as input which is weird.

@azhar.alikoya ,

maybe you access the polar rotation, with getItemAtIndex.


KR
Andreas

1 Like

@Draxl_Andreas Iam sorry, i didnt get how to use polar rotation as iam new to dynamo. But i’m specifying the required angle even though it is rotating in some other angle which is not constant all the time.

Hola amigo @azhar.alikoya buenas. Try to convert your degrees into radians, i had this issue with rotation parameters type value in Autocad


maybe that is the issue!!

1 Like

@gilberto.arechigaiba


Thanks alot for the info. unfortunately my graph still persist same issue . I rotated the texts to 0° manually, then i changed to 45° but after that when i try to change it to 0° back it remains in the same position. Even when i try to 90° from 45° it goes to 135° (adding 90+45).
Then i need to measure the current angle of text and rotate it accordingly :frowning:
If we can bring the four-quadrant concept in the graph it would be nice.


I could see that rotate family instance works based on 4 quadrants of a circle like it’s 0° is a constant position, not varying. As shown in the snip it has “SetRotation” predefined rule while Textnote has only “Rotate” rule.
I think i need to depend python for it. i dont know.

Hi,

The Element SetRotation node from the Genius Loci package should work with text notes.

4 Likes

@Alban_de_Chasteigner Thanks alot for the support.
I’m not sure whether the way i did is right or wrong, the value is showing as “null”

Hi,

I made a correction.
Replace the old node in C:\Users\%USERNAME%\AppData\Roaming\Dynamo\Dynamo Revit\2.19\packages\Genius Loci\dyf with this new one.

Element SetRotation.dyf (12.5 KB)

3 Likes

Amigo @azhar.alikoya buenas. i think what is your problem, the parameter Keep Readable is default yes in Text Notes, if is in yes you will only able to rotate the text note 180 degrees, you need to put it in no, for new Text Notes there is a parameter directly in the node, for existing ones you need to change the value, i let you the example, hope this helps you!!

1 Like

@Vikram_Subbaiah
Still the issue persist…

@gilberto.arechigaiba Thank you for the sweat for this graph! … I’ll do a try!

I like to make my issue more simpler to understand.
Example: I’ve several texts around a circle which need to be in 0°.

You may can use the BaseDirection and UpDirection to get the rotation of the text to know how much the text needed to be rotated in order to get it back to 0. I am not up to speed on pulling this kind of data from an element, so hopefully someone can provide input.

image

1 Like

Hi @azhar.alikoya Here’s something that might work for u as @staylor mentioned using the UpDirection i also have the same approach and attaching the graph as well along with this reply you might need to just run it twice as i just wrote a basic logic and if u want to refine it more feel free to.

Here’s the script, you’ll find 2 python nodes in it one that i used in the video above and second i thought to harness other property of AngleTo but didn’t complete anyhow the one shown in video will hopefully resolve your issue.
TextRotation.dyn (12.9 KB)

Regards,
BM