Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Cutting grids on structural views, adding dimensions, removing section markers, replacing viewport names

xotobeyn8970111
Explorer

Cutting grids on structural views, adding dimensions, removing section markers, replacing viewport names

xotobeyn8970111
Explorer
Explorer

Hello, I got a few problems again, but at the beginning - an explanation:

I have 188 sheets. Every sheet - 6 views. And 6 unique types of sheet, which can act as a template for the rest.

 

So, problems:

  1. I need to trim the axes in each view so that two perpendicular axes are trimmed exactly along the bottom and left axes. I already obtained a list of axes, but when I use the Grid.Curve command, I get the coordinates of the axes throughout the model, rather than in a specific view. Therefore, I can't trim the axes in the view without affecting the axes in the model. Are there any templates, scripts, or anything else that can help me solve the first problem?

  2. I need to add dimensions. Either using a template or automated for specific beams that will be selected by a script (since selecting every part in almost 1200 views to dimension them is what I'm trying to avoid using Dynamo for). I have a big problem with edges and faces - I have "learned" how to construct dimensions by selecting specific edges in the model, but I can't automate it because I've been using Dynamo for only a couple of weeks. In my understanding, it involves finding elements, organizing them by coordinates and lists (for example, if two dimensions come from one element, the element will be in two sublists with the ones that need to be dimensioned), then finding the two nearest edges and placing a dimension between them. I just don't know how to convey this to the computer. Can you suggest the best approach to solve this problem? Any tutorials, courses, anything? I found very few videos, and they only covered dimensioning axes and walls...

  3. I would also like to trim and move section markers on one out of six views on each sheet. They need to be moved towards the future dimensions with a small offset. The section markers are already placed, meaning the view is ready for further dimensioning and formatting. I don't even know where to start with this problem, except for transferring the coordinates of the section marker lines based on a template...

  4. Finally, the issue I'm facing is moving the view name on all sheets to the same point. The problem is that the annotation is tied to the coordinates of the bottom-left corner of the view, and they are not the same (although I managed to make them appear the same using workarounds, the annotations ruin it). When I try to move the view names, they move further and further on each sheet.

Just to reiterate, I have 6 formatted sheets (one for each unique sheet type) and 25-35 sheets with views that need formatting. I can't provide the scripts as they are all created only up to the point of the described problem, and in general, I need help specifically with the algorithm and nodes.
I would be really grateful for any assistance, as these are 4 out of 6 problems I've been struggling with since I started learning Dynamo and haven't been able to solve them on my own, despite reading countless forums.
Thank you in advance!

0 Likes
Reply
526 Views
4 Replies
Replies (4)

RPTHOMAS108
Mentor
Mentor

1) DatumPlane.SetDatumExtentType using DatumExtentType.ViewSpecific & DatumPlane.SetCurveInView 

 

2) Not sure how Dynamo works with dimensioning but what you describe seems convoluted although there is no easy way to auto dimension things. Most things that attempt to auto dimension things just create a mess. It takes a human to dimension something that is convenient for another human to read. However I would filter the elements per view then I would order the end points of the beams in relation to each grid direction on screen. You can obtain the references associated with the location line via Curve.GetEndPointReference and their model positions will be found via Curve.GetEndPoint. You will find that some beams are horizontal or vertical on the screen so in that instance the Curve itself acts as the reference (Curve.Reference) not the end points. So once you have the references in order you add them to the reference array. You then construct the dimension line via bounding box of items being dimensioned or the crop box in model co-ords (that is the messy part, where to place the dimension). 

 

3) There is not API functionality for that as far as I'm aware.

 

4) Not sure if you are talking about annotation within the view or annotation associated with the viewport i.e. view name? If the latter then you use sheet units with Viewport.LabelOffset & Viewport.LabelLineLength

 

Perhaps you can clarify some of the tasks noted with examples and you'll get more help with this. Also if you are using Dynamo for the task you may get better help on the Dynamo forum. But again if auto dimensioning was easy to achieve then that add-in would already exist and everyone would know about it (it is a common theme for sure).

 

0 Likes

xotobeyn8970111
Explorer
Explorer

The first picture is the views that need to be drawn up. The second picture is how it should be.

xotobeyn8970111_2-1696856223038.png

 

xotobeyn8970111_1-1696855546580.png

Orientation is not important.

1) Understand, i will try it, thank you a lot!

2) I tried to copy by element's category in view and it didnt work.

3) Is it possible to do this using Python scripts? Or is Dynamo basically unable to interact with these markers?

4) I need to move the "TITLE" in the center and on top of the viewport. So far, I have been able to do this only through the "crutch" and then not completely - hide all annotation elements so that all views become the same in the frame, then simply move them to a certain value through the excel. But I would like to move not by coordinates, but by the center using the actual coordinates of the viewport. This could not be done, since the name frame has strange coordinates that are very different from the actual location of the letters (strongly shifted to the left and slightly down).

 

And, to be honest, I tried to contact the Dynamo forum and they made it clear to me there that "we can't help, but we believe that I will succeed.".. This is no offense to the guys, they just couldn't help me there, and I can't imagine where else to turn

0 Likes

RPTHOMAS108
Mentor
Mentor

2) Didn't mention anything about copying things?

3) If it isn't possible with the API then it is the same for any language that uses the API.

4) Investigate with RevitLookup the label offset. In below example I've aligned label with viewport bottom left corner and viewport itself is far from sheet origin. Therefore this indicates that label offset (being almost 0,0,0) is not relative to origin of sheet but instead bottom left corner of viewport. 

 

231009a.PNG

 

You probably also find it is in sheet units.

 

Similarly you probably also find that Viewport.GetBoxOutline minimum point is the bottom left corner of the viewport relative to the origin of the sheet in sheet units.

0 Likes

xotobeyn8970111
Explorer
Explorer

2) I didn't quite understand the question. I tried to take a decorated view as a template and copy all the sizes from there, but it didn't work, although in the script, judging by the output data, they were copied. Now I have found a way to speed up the manual sizing a little - to use the "attached groups of node elements" in the revit itself.

3) Understood, thank you very much for the answer!

4) I've done it all and I know that the origin of the viewport header originates from the bottom left corner of the viewport itself. My problem is different - when getting the coordinates of the title frame and after getting the center of this name (relative to the lower left corner of the sheet) I draw an annotation line and get that it goes strongly past the real center of the title. The only thing that works for me is moving to the "zero" of this frame, then they all really move the same way to the lower left corner. But I need to place them exactly on top and in the center of the viewport, and I have a problem with this because of strange coordinates

0 Likes