Jump to content
Hans Martin Kern

Structurally identical record formats are not considered equal by Vectorworks

Recommended Posts

I create a VW record format in document A with the following code snippet

if (! VWRecordFormatObj::GetRecordFormat("SomeRecordFormat")) {
    
    VWRecordFormatObj recordFormat("SomeRecordFormat");
    recordFormat.AddParamCoord("SomeParam", 0.0);
    
    recordFormat.SetLock(false);
    recordFormat.SetFormatVisibility(true);
}


and assign the record format to a VW object in document A and enter some value for "SomeParam".


Then, I open up a new document B and create a VW record format in document B with the very same code snippet shown above - so record format "SomeRecordFormat" is structurally identical in both document A and B.
 

Now, I try to copy / paste the VW object with the associated "SomeRecordFormat" data from document A to document B. Vectorworks brings up a dialog complaining about the record format ("SomeRecordFormat") already being contained in document B and asks if I would like to replace, merge, rename the record format or continue using the existing record format.
 

Is there a way to "convince" VW that the record format in document A and B are the same and that it should not bring up the aforementioned dialog? Looks like there's a hidden unique ID or a time stamp attached to the record format?

Share this post


Link to post

VW doesn't do anything other than check the record structure for comparison. It can be finicky, for example changing a number format or a default value will cause the record formats not to match. I did a quick test with vs, and I'm not getting the conflict dialog.

 

If you've confirmed that the dialogs match, there could be an issue with how VW is formatting the coordinate field such that it re-formats slightly on the first use. Try assigning to an object before pasting from the other file and see if you still get the error.

Share this post


Link to post

Thanks for reaching out, Jushua.

In fact, that's what I did. I assigned the record format to an object in file B. Both record formats are structurally identical as they were created from scratch by the code snippet posted. I have not touched the record formats after creation by any means. They are identical. So my conclusion is that there has to be some hidden ID / timestamp attached to the record format which makes the record formats different.

Share this post


Link to post

There isn't any additional data. If you manually create two identical records, you won't see any conflict errors. Are units the same in both files? Do you seem the same results with a text field?

Share this post


Link to post

Units are the same in both files. In fact, I do create them both from the very same template file. Same result with text field. The same effect can be triggered if I create a record format manually in both files.

Share this post


Link to post

Are you using the standard US version, or a localized or educational version? It's possible that there is a security tag that is getting attached. If you can reproduce manually, I would submit that as a bug.

Share this post


Link to post

I just repeated your test in VW2020 SP4 and got the same issue you are showing.

 

I tested it in a different version and it behaved the way Josh suggested it should? How good are you at holding your breath?

Share this post


Link to post

Pat - thanks for checking the issue in a different version. I verified it using the different version, too. Looks like I'll hold my breath... 😉  

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...