Jump to content

ObjectData Eval in Script


Recommended Posts

There is a worksheet function I'd like to use in a script. My script is performing a task on a list of selected ConnectCAD Circuit objects, and I want to get the Y Coord of the Source Socket to process the sockets in the desired vertical order.

 

ObjectData(eval circuit source socket) exists, which sounds exactly what I need. I know how to use it in the data manager, but can these ObjectData functions be used in scripts?

 

Also, I'm trying to return the Y Coordinate of the Socket, which I believe is a function. I don't know whether the ObjectData functions can only return record fields, or functions like Y Coordinate as well? If not, I may have to iterate a loop through all sockets to find the socket handle manually, but I'd rather not do that if possible.

 

Thanks

Link to comment

I don't think there is a way to use WS functions inside of VS/Python.  Sorry.

 

Since they expanded WS functions to Data Tags, maybe it would be possible to allow this in scripts also.  But the problem would be identifying the object. The WS Functions works well with DataTags because the tag specifies a specific item just like a database subrow.

 

For a script, there would have to be an additional step to identify the object to be evaluated. And probably error checking to make sure the object is valid.

 

But a nice thing for a Wish or VE though.

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