Help building Dynamo Script

I’ve watched tutorials but still find it difficult to know what to pick from the library. Hoping someone can help me write a simple script to draw lines.

Basically I have some 3D objects in my model and I want to draw lines on these objects.
So 3D walls and beams and I want to draw 2D lines on a floorplan exactly where the 3D objects are. In order for me to get the outer lines of the objects only to draw them as hidden.

Can someone assist me?
Thanks!

@YungPadawan

Hi,

Take a look at this link:
How to get help on the Dynamo forums - FAQ - Dynamo (dynamobim.com)

Regards,

I second what Organon said but I will also add why not just change the cut line pattern to a hidden line style. No dynamo is needed for this.

3 Likes

Forgot to mention the model is linked. (Not my own model)
So when I change the lines to hidden using the filter the lines change. But it shows only the outer part of the object, not all 4 lines, it just shows 2.

I want to see all 4 of them.


- - 


- -

I see this but want this

- - 
| |
| |
- -

You do not need a filter you can change the cut line pattern of the links under the Revit Link tab in the Visibility Graphics menu. Sometimes elements are drawn with multiple sub-layers requiring you to change more than one cut line style. You may also need to change the projection lifestyle too.

In addition to all of this, there is the line working tool that allows you to change individual line’s line styles.

How can I check if they are drawn in multiple sub-layers?
I’ve already changed the patterns @ the visibilty graphics menu, but I don’t see all the lines.
I see the lines when the object is selected, but when it isn’t selected I just see 2 sides.

Display on floorplan

- - 


- -

Display on floorplan when void is selected:

- - 
| |
| |
- -

What is the element? Is it just walls and beams or other things? It could be helpful to see a screenshot of what you’re talking about. You can tab select the element though and copy past it into your model though. That will allow you to edit the family and check there.

I actually have come across a similar situation where I wanted to outline elements from ifc files. In my case, I was looking at prefab T sections in a parking garage.

The strategy I went with was:

  1. get geometry surfaces
  2. filter surfaces facing upward
  3. convert surface perimeter curves to details curves in view

but this will depend on the complexity of your geometry. The example given was somewhat vague

I would prefer to create a section through everything with horizontal plane and get the intersections as curves directly, or export the floor plan view as DWG, but maybe your problem is that you do not like the trianglular surfaces edges visible?

It’s just a wall.


This is the void inside the wall

What it looks like having set filters to display as hidden.2021-10-04_09h44_58

When I select the void, then it shows more hidden lines, that’s exactly what I want the voids to look like on the floorplan.
2021-10-04_09h45_52

This is the family of the void after opening it:

It’s simple walls and voids, no curves or anything.
How do I get geometry surfaces?

I just want the floorplan set so everytime there’s a modelupdate, I can update the floorplan with the voids shown as hidden line, at the parts where there’s concrete above the void.
So linking the updated models should update the floorplan, or perhaps copy the objects with a script so there’s no manual drawing the lines.

@Ruben the problem was that we didn’t have enough control of the ifc graphics since all elements come in as singleton families. We were only worried about the top surface showing in plan view.

@YungPadawan geometry.explode will give geometry objects, filter for surfaces. or use Lunchbox ‘deconstruct solid’. Are the walls and voids in your model or a linked model? (Also it may be simpler to just add the hidden lines into your opening family, the only reason we opted for a dynamo solution was because the ifc was bringining in hundreds of singleton families)

It’s a linked model, can I still use the method you describe?
Also when download lunchbox package it doesn’t load into dynamo, I’m using Revit 2020.

For similar effort user selects link and category and output is a filled region with specified linestyle for elements within active view extents.

Process: Get all elements of specified category from link. Compare coordinates (adjust elevations and locations). Get active view extents (bounding box) translate based on coordinates (if necessary) Get all elements intersecting bounding box. Get faces of intersecting elements. Filter surface directions. Get perimeter curves of surfaces. Pass resulting curves to filled regions with assigned line style. For your case just pass detail lines.

1 Like

Just update the family to show the symbolic hidden lines in plan.
Seems total overkill for Dynamo.

1 Like

Driving this content via surfaces has worked well for situations where varying disciplines require more finite control over visibility without requiring managing families of a 3rd party fluid model. This is especially evident when 3rd parties don’t adhere to consistent family libraries…or when they do weird things like unique door families per type…per floor…on a 54 story building.

I’d be happy if I could just get electrical engineers to put light fixtures on the ceiling rather than the floor.
Hate to say it - but Revit is headed down the same “Tower of Bable” that was/is the death of AutoCAD.

I hope so…but I’ve been hearing that for years. I always thought it wouldn’t take much for a software developer to come up with something really revolutionary on the documentation front…as long as Adesk doesn’t buy it out ;).