Jump to content

Introspection with Python?


Recommended Posts

Hi

Im quite glad that python has been integrated into vectorworks for the 2014. Really hoping to get my hands on this upgrade!

Question: Is it possible to have access to the document lists through python?

For example, In some projects, I would like to display some lists of objects/symbols in a tabular way so that I can sort them and have easy access to them.

Is this possible with the python framework or even with the C++ SDK?

Many Thanks

Miguel

Link to comment
Guest Jim Kelly

I have a feeling that introspection in Vectorworks and Vectorscript may mean something else than it does to me as a programmer, but if by introspection you mean the general programming term, yes Python has some really powerful introspection features:

http://www.diveintopython.net/power_of_introspection/

Particularly powerful is the dir() method which allows you to get a list of all methods and variables on an object that you pass to it. Really helpful if documentation isn't clear on something and for debugging purposes.

If you already know this and/or that isn't what you meant, well, perhaps it will be of interest to someone else that comes along. :)

Link to comment
  • 1 month later...

Hi

I wasn't referring to object introspection within the python language, but "object" introspection within the vectorworks framework.

For example, would I be able to develop a plugin, in python, that would find all spotlight instruments with a certain "Dimmer" value and create a selection with these?

Many Thanks

Miguel

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