sllewellyn Posted November 17, 2022 Share Posted November 17, 2022 I am looking for suggestions on what to use as a database primary key for a lighting device. I cannot figure out how to get the UID to be a field that could be linked to a database. Ideally this field would be something that Vectorworks could autonumber so that I wouldn't have to go and manually number the field each time a device was added. Quote Link to comment
JBenghiat Posted November 17, 2022 Share Posted November 17, 2022 How are you exporting data? If you're starting with a worksheet, you can use the 'UID' field. File>Export>Export Lighting Device Data.. will always include the UID in the data file, as well as break out cells and accessories. If you're exporting via script, you can retrieve and write each objects UUID. Quote Link to comment
sllewellyn Posted November 17, 2022 Author Share Posted November 17, 2022 I am aware of the method you mentioned but it is not what I am looking for. I am trying to connect to a database using OBDC which needs a unique primary key to add records to the DB. I can go through and manually add a unique number to a field and make it the primary key but this can be tedious when adding new lights and makes it difficult to copy and paste lighting devices. Quote Link to comment
Recommended Posts
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.