Iteration - after successfull run, again run same script again & again with new/next value

Hi, I want to run this script again and again in loop with new value
please give me some ideas


Export.dyn (41.8 KB)
REVIT.rvt (5.3 MB)

I’ve built similar for a customer before (paid effort so I cannot share it), in that situation I used Python node so I could leverage the Transaction.Rollback capability to ‘undo’ the isolation after each export.

To leverage nodes I think you would want to duplicate the view for each data set, isolate the unique data sets in each intended view, and export the views. You may need a transaction.end and transaction.start node in there to make headway.

3 Likes

@jacob.small
Really Thanks for your reply and time
Actually I’m new to Dynamo Scripting and still learning it. Could you please explain this in detail?

  1. Start by figuring out how many exports you have, and duplicate the view you are exporting that many times.
  2. Next take the values you are filtering by and generate a list of does not equal element filters. You want a list of lists, where each nested list is the list of elements to hide. Watch the list lacing and levels here.
  3. Then add your category filter - make sure your element count doesn’t change.
  4. Feed your list of views and the element filter lists into a hide elements temporary node, and then run the export.
1 Like

hello, I had tried before 2nd detailed answer from Mr. Jacob
For information

I don’t have a dwg export node (custom I think)

cordially
christian.stan

Hello, I have an answer that I don’t understand by doing the reverse
it seems that the node behaves in the singular (it only isolates the first element of the list, it’s quite possible that this is from me too)
node hide
Capture d’écran 2023-04-15 174328
node isolate


cordially
christian.stan

I think longest lacing would be required here.

1 Like

I also tried before with the long lacing, even look like that disturbing, it doesn’t want to isolate the tag.


Cordially
christian.stan

Can you try with attached revit project?

Hello,



Script: 15 Avril Forum anglais.dyn (49.1 KB)

Cordially
christian.stan

1 Like

@christian.stan

I tried this but its not working with multiple elements of one Duct Systems.
(eg. AHU 3 SAD system contains duct+elbow+taper)

Can we use while Loop node here?

Hello, my analysis was a bit too close to your initial statement (I’m going to have to think differently),
I’m pretty busy right now, I’ll be watching the weekend in fifteen

Cordially
christian.stan

1 Like

Hello, I’m not sure of the result, try this script just in case.


script:
13 Mai Forum anglais.dyn (48.3 KB)

Cordially
christian.stan

It looks to me like you are asking for a complicated solution to a simple problem. What you really need here is list leveling and lacing, which are Dynamo concepts you may not be familiar with. If you set your list level to level 1 for the value input and input that entire list, it will deal with each element in that list as its own list. So it wont run in a loop like you describe, but it will take parameter name one and apply the other values to it, then parameter name two, and apply the values to it.

understanding leveling and lacing is critical to working in Dynamo, it is the real skill gap.

This video about leveling was really helpful for me in understanding these concepts: Understanding list levels in Dynamo! - YouTube

And this video does a good job of explaining lacing:

These two concepts will solve your problem for you.