Jump to content

Worksheet - nesting records


Recommended Posts

Hi! I am creating a worksheet to list Circuit objects. The worksheet currently lists 'Circuit'.'Number', 'Circuit'.'Src_Dev_Name', and 'Circuit'.'Dst_Dev_Name' properly.

 

I would like to add a column that references a custom record attached to the destination device. The field is 'CPT_fielddevice'.'Mount Group' but entering that formula in the worksheet column header does not return anything, since the CPT_fielddevice record is not attached to the circuit. 

 

Is there a way to do this?

Link to comment
  • Vectorworks, Inc Employee

Hello @mstrauss159,

 

If I understood you correctly that you want to get a destination device record by having the circuit, I believe that it is possible to do that with the "eval circuit destination device" worksheet function.

For example, in the DB Row, your formula should look something like this: =OBJECTDATA('eval circuit destination device'; 'CustomRecordName'; 'CustomRecordField')

 

I believe that should be it, but if you have any other questions related to this, feel free to ask.

  • Like 4
Link to comment
17 hours ago, Boris Stefanov said:

Hello @mstrauss159,

 

If I understood you correctly that you want to get a destination device record by having the circuit, I believe that it is possible to do that with the "eval circuit destination device" worksheet function.

For example, in the DB Row, your formula should look something like this: =OBJECTDATA('eval circuit destination device'; 'CustomRecordName'; 'CustomRecordField')

 

I believe that should be it, but if you have any other questions related to this, feel free to ask.

 

This did it, I just had to replace the semicolons with commas. Thank you @Boris Stefanov!

  • Like 1
Link to comment
  • 2 months later...

Hi @Boris Stefanov,
I was wondering if the same trick could work with exchanging data from a record field attached to a Device, to a record field attached to an Equipment Item.

The Devices have the "Device Network Info Record" attached.
I also have Equipment Items which have an "Eqp Item Network Record" attached.

What I'm trying to do is have the 'Eqp Item Network Info Record'.'IP Address' be filled in by the value in its corresponding 'Device Network Info Record'.'IP Address'

 

I've been toying around with the =OBJECTDATA function, but no luck.

Is this possible and if so, could you help me out with the correct syntax?

Thanks in advance

Link to comment
  • Vectorworks, Inc Employee

Hi @R_Teunissen,

If I understand you correctly, you have a record field from a device, that you want to transfer to an equipment device, which has a different record. I'm not sure if it's possible to fill them automatically by using a worksheet function, but the closest thing I can suggest is having the device IP record field in one column ='Device Network Info Record'.'IP Address' and the equipment IP record field on another column by using the ObjectData function =OBJECTDATA('eval equipment item'; 'Eqp Item Network Info Record'; 'IP Address')  and then copy the contents of the first column to the second and this will copy the values to the specified record.

 

worksheet.gif

 

The other solution is to create a script that transfers the record values, but I think the first solution might be easier.

Link to comment

Hi @Boris Stefanov<
I also reached out to other sources of wisdom and Peter Vanderwalle at Design Express Belgium helped me out with a script.
He called this "transfer_to_equipment' which is 14 lines of code.

In the Data Manager, I was then able to transfer data from 1 data source into the corresponding Equipment Item (based on the Name)

The formula is in the screenshot below.

While we're on topic:
If I have multiple instances of a Device, which are on different Design Layers, would it be possible to synchronize the value of a record Field between these Devices?
For instance; the 'Device Network Info Record'.'IP Address' filed is the same with every Device with the same Name, no matter which Design Layer they are on?Screenshot2025-04-15at13_58_48.thumb.png.90ccaf273009ac5c98b2e925eeb8a486.png

Edited by R_Teunissen
Link to comment
  • Vectorworks, Inc Employee

Hi @R_Teunissen,

I'm not familiar with the Data Manager, so unfortunately, I won't be able to assist you there.

About your question, it may be possible to do this via a script which checks if the device names are the same and copies the record field value to the other devices. The only problems with this are that you have to run the script each time you want to synchronize the values, and the other problem is for example if you have two or more devices with the same name, but different field values, the script must choose which value should be copied to the other devices.

Link to comment
2 hours ago, R_Teunissen said:

@Thomas Peters although I did not make this script (that was Peter Vanderwalle @Design Express Belgium), I've pasted a screenshot below:

 

Screenshot 2025-04-19 at 14.55.01.png

 

That's a useful script, thanks.

 

Lots of my purposes for scripting seem to be scuppered by the fact that the sockets in devices are just copies of the same objects shown in the device profile group, which makes relational scripting outside of the standard ObjectEval functions quite difficult. I was hoping a script in this way might sort it but alas, not yet.

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