Jump to content

ConnectCAD - Create Devices By Script


Recommended Posts

Hello, I'm imagining this is one for @Conrad Preen and @Nikolay Zhelyazkov, hope you guys are well.

 

I have a need to create Devices from a list of items coming from an external source. The Devices will all be things in our library - so 3D symbols with the attached Device Def Record.

 

Is this possible at the moment? I can do it with Equipment Items, but Devices seems a step further. I'm presuming I would start with CreateCustomObjectN, but unsure after that.

 

Failing that, it would have to be:

- Import required symbol resource

- Read CC Def record

- Use CC_DeviceFromShape to make a Device of the correct height

- Programmatically insert required sockets inside the profile group (the profile group of Devices always confuses me)

 

If there is anything on the way for this soon then it would be useful to know, please, before I go down the rabbit hole!

 

Many thanks,

 

Simon

Link to comment
  • Vectorworks, Inc Employee

Hello @spettitt,

 

Have you tried using Create Devices from Worksheet menu command? It takes a worksheet/list and creates the devices from it. If the devices are known to ConnectCAD (aka make/model is present in the device builder) then the created devices use the definition and get created with the correct sockets and data.

 

Best Regards,

Nikolay Zhelyazkov

Link to comment
57 minutes ago, Nikolay Zhelyazkov said:

Hello @spettitt,

 

Have you tried using Create Devices from Worksheet menu command? It takes a worksheet/list and creates the devices from it. If the devices are known to ConnectCAD (aka make/model is present in the device builder) then the created devices use the definition and get created with the correct sockets and data.

 

Best Regards,

Nikolay Zhelyazkov

 

I have used it before yes, but from memory I think it just creates a pool of devices together. The incoming information will know which rack, location etc each device is in, so I was hoping to programmatically insert them on Layers and set their position from script. I'll have another go with it though. 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...