Trouble with Translating Geometry and List manipulation

Hi Guys,

Still learning Dynamo and haven’t touched on any python yet
This project is purely to help me get my head around some more dynamo concepts that i havent really gotten the hang of yet.

End Goal here is to print a sheet to pdf with a drafting view showing 1 filled region for each fill pattern currently loaded in the model - completed entirely through dynamo - e.g.

So far, I have successfully created a number (“n”) of new Filled Region Types that populate into revit, and are being named sequentially according to number of patterns loaded (also “n”). I have pushed the foreground fill pattern into each filled region type so that they are all unique. I have also been able to create “n” filled regions using polycurve.bypoints. I have then used Geometry.translate to space the filled regions into a grid.

Here is where i hit a snag, I can translate in either x direction or y direction no problem, but i can’t seem to do both. I think that i need to perform two operations:

first I chopped the list of regions into a number of columns and geometry.translate the groups (this part is working). This example file shows 50 regions created and spaced appropriately in 10 rows. My next step i “think” is to transpose the list in able to create the 5 rows.

I guess i’m looking for 2 pieces of help if you can:

  1. Is there a better way to accomplish this
  2. It may not be the best way to go about the task, but the stubbornness in me wants to firgure out why i can’t make it work using this method!

Create filled regions.dyn (360.3 KB)
Purged Template.rvt (1.7 MB)

Thanks for looking :slight_smile:

@Rookio Keep at it. You are doing great so far.

Yes, you can transpose it in one operation. I would have done something like this:
LegendCreator


Create filled regions - Amol.dyn (74.2 KB)

Better way as in?
Logic readability?
Minimizing run time?
Minimize the use of node?
More/less reliance on packages?
Adding more functionality?
and the list goes on…

Everyone would have a slightly different definition for their better way.
So yup, there would always be a better & more efficient way to do something.

I would suggest just keep practicing and you will get better with time :slight_smile:

3 Likes

@AmolShah, my apologies for late reply, been hectic lately!

Thank-you so much for your help, your explanation was fantastic.
Much appreciated mate.

1 Like