Change Revisions Sequence

Hi all,

A pretty dynamo noob here.

I’m trying to get all my “work in progress” revisions at the bottom of the sequence list.

I managed to get them with the list selector in a really not efficient way. (I don’t know how to filter by parameter but don’t want to go OT)

Capture

The question is:

How can I change the sequence of those revisions to be at the bottom of my list?

Thanks a lot in advance to whoever is going to reply!

ps: using dynamo 2.0 on revit 2017

Do you want to organize by date rather than sequence? Or do you want to grab the last 16 revisions? Not super sure what you are asking.

Hi Steven,

Thanks for your time!

I want to grab the 16 revisions and move them to the end of my sequence list.

You can do it manually for each revision in Revit with the “move down” command but I got 669 row to move times 16 revisions and it takes 5/10 seconds for every row = a stupid amount of time wasted…

The first 16? What 16 would you like to move to the end? There needs to be something unique about them.

This is really easy too once you get the hang of it. I am just not sure how your data is organized.

This is a brilliant idea…

So the OP has revision sequence positions 0-16 and wants their sequence position to be 653 ie. the end of the list -15

The unique part is that the date input has xx. At the front… this is different from the date created as the image shows.

I don’t know if it’s as easy as ‘set parameter value by name’ with a bit of list reordering by index… usually these things aren’t :slight_smile:

I’ve literally lost hours of my life doing this, it would be great to do it with Dynamo!

Unfortunately i’m out of the office but I could have a look tomorrow.

Mark

Edit: Set revision sequence looks promising! http://www.revitapidocs.com/2018.1/e3b46f87-ccb2-a706-ec4e-e24cbd601732.htm

@Mark.Ackerley indeed is correct about the fact that there exists a method in the API that allows us to set the Sequence of Revisions automatically.

Imagine that we have a revisions table like so:

All of my revisions are currently ordered by Date, but I want them re-ordered by Description.

…and resulting revisions table:

As you can see, you will need to figure out what your desired sequence is for the revisions, put them ALL in a list and just feed that new order into the Revisions.SetSequence node.

This can be found in latest archi-lab.net package:

image

NOTE:

This method allows the caller to change the sequence of the Revisions within the project by specifying the new sequence. The specified sequence must include every Revision in the project exactly once.

Note that changing the sequence of Revisions can change the SequenceNumber and RevisionNumber of Revisions that have already been issued.

7 Likes

Thanks guys and thanks @Konrad_K_Sobon

So I can get them sorted by date with the wip revisions with the “xx” date at the bottom/beginning of the list.

I’ll try it in a detached model first.

Thanks!

Update:

Run the script like Konrad suggested. I get the xx revision at the bottom in a couple of seconds which is brilliant.

However Dynamo can’t recognise the date properly and puts randomly 2017 and 2018 based on first 4 digits.

update 2: added a spring node DragDropReorder feeding now the SortByKey.

It works in theory but at the end doesn’t change the sequence of the revisions…

Hey,

However Dynamo can’t recognise the date properly and puts randomly 2017 and 2018 based on first 4 digits.

I’d say that was a bit harsh and not very Christmassy :stuck_out_tongue:

So if you think how Dynamo is thinking… It’s ordering by number (e.g. 01.03.18 comes before 02.02.19) then it’s putting the letters at the end… so 01.03.18 comes before xx.03.19 comes before xx.06.18

Here’s a way of putting it back together… this is for the particular xx.Month.Year format you are using, but you get the idea… if people could just use xx.xx.xx it would be better (particularly this late in the month and the year!)

Hope that helps,

Mark

Edit: See below for updated thoughts…

1 Like

Hey Mark,

So if you think how Dynamo is thinking… It’s ordering by number (e.g. 01.03.18 comes before 02.02.19) then it’s putting the letters at the end… so 01.03.18 comes before xx.03.19 comes before xx.06.18

You’re right I didn’t mean to be the Grinch here, sorry Dynamo. :slight_smile:

Thanks for your help, much appreciated!

I’ll have a go

No worries,

I didn’t do much compared to Konrad writing a custom node and uploading a new version of his package for us!

The nulls are a funny one, I haven’t sorted that very well… I guess they should be auto set to the date they were issued or to an xx value if they’ve not been?

Capturing oddities like that’s where the graphs start to balloon…

Happy Christmas :slight_smile:

Mark

Ok, so I’ve had a change of heart…

THAT WORKFLOW IS REALLY REALLY DANGEROUS DON’T USE IT :smiley:

So let’s see how it might be used in practice…

A sheet has been issued 5 times, it has incorrect dates in it’s revisions…

E 12.05.18
D 06.05.18
C xx.04.18
B 03.02.18
A 01.03.18

Using the graph would make it…

E xx.04.18
D 12.05.18
C 06.05.18
B 01.03.18
A 01.03.18

Which is numerically correct BUT NOT HOW THE SHEET WAS ISSUED.

Dynamo should be used to reorder 1 revision at a time (still a great time saver). Or to highlight mistakes, but don’t do a wholesale reorder without being very sure of yourself.

My revised graph…

RevisionSequence-1.dyn (20.1 KB)

Apologies,

Mark

Hi Mark,

Happy New year!

Thanks a lot for your thoughts.

I test it with the old script a couple of times in a detached version of the model and Yes, was messing around with the revision sequence.

I’ll have a try with the new one

Thanks again!

:sunglasses:

Enrico

1 Like