Jump to content
Developer Wiki and Function Reference Links ×

Automating "Update From Schematic" for All Panel Layout Objects in Vectorworks


Recommended Posts

Hello Vectorworks Community,

 

I'm currently working on a project that involves updating all Panel Layout objects using the "Update From Schematic" command. This command is accessible through the Object Info Palette, but I haven't found a way to automate it via VectorScript.

 

My Goal:

I need a script that will iterate over all Panel Layout objects in my drawing and run the "Update From Schematic" command on each one. This is essential for synchronizing the panel names and connector tags based on their connected sockets.

 

What I've Tried:

  • Iterating over objects and using SetRField and ResetObject to force an update, which didn't achieve the desired result.
  • Searching through the Vectorworks Function Reference for any related functions or commands, without success.

 

Challenges:

  • The "Update From Schematic" command isn't available as a menu command, and I haven't found a corresponding VectorScript function.
  • Directly forcing a refresh or toggling properties does not update the panel names and connector tags correctly.

 

Questions:

  1. Is there a hidden or undocumented method to programmatically invoke the "Update From Schematic" command for Panel Layout objects?
  2. Has anyone found a workaround or script that successfully updates these objects in bulk?
  3. Would using Python scripting in Vectorworks provide more options or flexibility for this task?

 

Any insights, examples, or suggestions would be greatly appreciated!

Thank you in advance for your help!

Andy

Link to comment

I have some bad news for you.  The Update From Schematic button that you see in the Object Info Palette is hard coded into the Panel Layout object itself and can't remotely be triggered.  You would need to create a menu command that replicates what the button does.  I do not have ConnectCAD, so I can't tell you what it is doing or how to do it.  I imagine based on your description that when you press the button, it searches for the linked Schematic Socket object (likely using the Socket's UUID or some other unique token), then pulls the relevant data from the Socket, then uses SetRField to update the fields of the Panel Layout before using ResetObject to refresh the Panel Layout.  It sounds like you have made attempts to use SetRField and ResetObject, but you may be missing the step about using GetRField on the Socket to pull the updated panel name and connector tag first.

 

So to answer your questions:

  1. There is not.
  2. You might ask this question on the ConnectCAD subforum.  There is a chance that they might have a workaround.
  3. In this case, Python would not help.  Python is great for managing data and using external libraries for things like accessing web data, but when it comes to interacting with Vectorworks, the current Python implementation is restricted by the Vectorscript functions, as all VW interactions are handled with the vs Python library, which is an exact duplicate of the Vectorscript function library.  So things like ResetObject(h) instead become vs.ResetObject(h), but there is no added functionality, and in some cases, there is reduced functionality since Python can't pause itself and wait for user input like Vectorscript can.

That all being said, if you post a drawing with Schematic and connected Panel Layout object, I might be able to look at the records behind the objects to see if I can help you out.

Link to comment

I downloaded the file and opened it up this morning, but it appears to be completely empty.  No objects found in the drawing and nothing in the Resource Manager.  This could be because I do not have ConnectCAD on my machine, though the typical way for Vectorworks to handle this would be to have the objects but not allow them to be editable.

 

There is a "hidden" parametric record for a Circuit object, which has fields for __Src_ID and __Dst_ID, so it tells me that there is some internal ID method for tracking ConnectCAD objects and that there likely is a similar field in the Panel Layout object.  For your knowledge, any field starting with a double underscore (__) will not populate in the Object Info Palette.  It's very useful for storing data that doesn't want to be "front facing" for direct user interaction.  Unfortunately, without having access to a drawing with linked ConnectCAD objects, I can't help you too much.

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