I want to create a workflow like this.
- Extract Lines from CAD link/insert.
*Segregate pairs as per the wall thicknesses.
*Identify the longer line of the pair.
*Create wall based on that line.
While I have been able to create this partially. But since the node Springs.Geometry.GroupByDistance has some limitations. You can filter lines which are nearer to each other than the specified distance, I am forced to create different thickness wall lines on different layers to branch out work flow. This works but not a very smart way to do. Is there a node (or script ) where the lines can be grouped (paired) based on their distances from each other. Enclosing the file : Walls from line on CAD insert.dyn (75.6 KB)
Got a dwg with the standards you are trying to build this off of? An even starting points will matter here.
Basically in A-Wall layer. Right now wall thicknesses 100 , 200, 150 mm. But depending on project can be modified to 115 , 230 mm etc.
It is possible to automate the workflow to set the wall types :
This is very interesting approach. You are modifying the walls once they are created. Could you share the .dyn file please?
That topic is so interesting …i read all the dynamo workflow from @Alban_de_Chasteigner …but the code block DSCore.String.Concat (DSCore.List.Clean…etc didn’t appear clearly for me …
You’re right, the code block is not fully readable.
This is a definition by Vikram_Subbaiah to collect the numbers in strings.
I tried the code but it gives me some errors >>>any advice
what can i fixed this problem of null>>>plz
It is for the record never good to just “use” a graph without understanding what is going on under the hood…
The codeblock work as follows:
If the input is bigger than 0 AND smaller than 400 it will allow the input through, if the input is outside this interval it will return “null”.
My guess is that @Alban_de_Chasteigner uses it to make sure to only get thickness of walls and not lengths etc.
@Jonathan.Olesen is absolutely right.
The input for the margin in Springs.Geometry.GroupByDistance can be a simple codeblock with your maximum wall thickness.
In my example above, I assumed that there was no wall thicker than 400 mm.
i think the error is here not in code block (in geometry.distance to node gives me one result not lists of lines
Because yousee using code block to only ask for distance between two lines?
This. 1 million times over.
Hi @Alban_de_Chasteigner wall from cad trial.rvt
Tried to recreate the workflow. I am getting some error as attached. And also not getting walls in correct location. Could you look in to this and advice?
Walls from line on CAD insert-NEW.dyn
Your autocad import is the main problem.
It is better to use polylines than lines in Autocad.
wall from cad trial.dwg (19.6 KB)
There was also a problem with the order of the transactions.
It can be resolved with Transaction.End and Transaction.Start nodes.
Tried with pline and the nodes you have mentioned. Still not getting the geometry correctly.
Can you show the Revit result and the errors in your graph ?
For some reason Dynamo and revit are crashing as soon as I open the dyn file. Trying restarting the pc. Even installed latest dynamo version.