Jump to content

Inserting a new Revision


Recommended Posts

Has anyone scripted the process of adding a new revision to a given sheet?

 

I can GetRField of revision numbers fine, and I can SetRField for any 'normal' fields, but I'm not sure how revisions work given that it retains the history of previous revisions and their data.

 

I know it's a hidden record field for the revision data, but I don't know how to add a 'new' revision on top of the entries that are there.

 

Thanks

Link to comment

I THINK that each revision is a separate record.

 

It looks like when a new is made (or before it is made probably), each of the existing records name has the extension increased by one, and the newest record that is created has an extension of 1.

 

Not at all certain that there is not more going on under the hood that would make this more complicated.

 

If you create a Worksheet Database with a Criteria of Object Type is Title Block Border, then you can see all the record attached.

 

When I have two revisions, I get:

 

Revision Data-1

Revision Data-2

 

When I add a third Revision, it is the one titled Revision Data-1 that holds the most current data.

 

Ask again if you need more help.

 

 

 

 

  • Like 2
Link to comment
  • Vectorworks, Inc Employee
On 6/22/2024 at 9:27 PM, Pat Stanford said:

Please let us know if that works.  

 

My gut tells me that may not be enough and that there is something else happening as well.

 

But it is certainly worth the try.

- Yup, there is more happening in the background.

1) We do not always create new record. If the title block does not use all the existing revision data records it makes use of them first and only if it uses all then we create a new record.

2) @Pat Stanford is right about the order - Revision Data-1 is the newest revision.

3) We are also doing some changes to the Revision Data record (without index) to support reverse translation with older versions where we had only 1 record for revisions.

 

So adding new revisions from script and not from the UI might cause some issues, just FYI to be aware.

 

Best Regards,

Nikolay Zhelyazkov

  • Like 2
Link to comment
On 6/24/2024 at 7:52 AM, Nikolay Zhelyazkov said:

- Yup, there is more happening in the background.

1) We do not always create new record. If the title block does not use all the existing revision data records it makes use of them first and only if it uses all then we create a new record.

2) @Pat Stanford is right about the order - Revision Data-1 is the newest revision.

3) We are also doing some changes to the Revision Data record (without index) to support reverse translation with older versions where we had only 1 record for revisions.

 

So adding new revisions from script and not from the UI might cause some issues, just FYI to be aware.

 

Best Regards,

Nikolay Zhelyazkov

 

Thanks Nikolay - sorry for the slow response, busy week.

 

I think #1 would be possible to manage in a script now that I know, but #3 might introduce some unknown. It's a relatively low priority efficiency script compared to others, so I might put this one on the backburner unless someone starts really asking for it, in which case I'll proceed in context of the above. Thanks! 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...