Jump to content
Developer Wiki and Function Reference Links ×

Structurally identical record formats are not considered equal by Vectorworks


Hans Martin Kern

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?

Link to comment

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.

Link to comment

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.

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...