Jump to content

vsoGetEventInfo Returns

Recommended Posts

Hey All,


So, I'm working on implementing a Custom Object in python that I want to have Events enabled for.  I understand the I need to use vsoGetEventInfo function to get the Event ID and any related info (Control ID, Button ID, etc)...my question is, if there a list somewhere of all of the possible Event ID Integers and descriptions of what each of them are?  I've tried looking through the dev documentation and I've found a few scattered here and there in various examples but I have been unable to find a comprehensive list.  Does anyone either know where one of these is or has a list that they can post?




Share this post

Link to post

Hi Gonda,


Your best option is to download the SDK and look for the MiniCADHookInf.h file. (Going from memory, so forgive me if the file name is a close match). This will contain the constant values relating to PIOs. (Any constant values are shared between the SDK and vs). 


The only event need to include is OnReset, which is where you draw your main geometry. OnInit also runs for every plug-in (once per session unless you are in developer mode), and this is where

you enable the other events, like state changes, widget prep (drawing the OIP), button events, etc. 



Share this post

Link to post

Hey Josh,


So, I found the MiniCAD Hooks file and it's a great reference.  I've found all the info for the ObjXProp info; however, unless I'm missing something, I can't seem to find anywhere either in that file or elsewhere in the SDK files that lists the EventID Constants.  Any other ideas?




Share this post

Link to post

Oh right, this got restructured a bit.  In the current SDK, the values are now in MiniCadCallBacks.h, starting around line 5442.  It's a little harder to read -- you want the values assigned to each kaction.  The comments will help describe what the events are for.  Note, not all events get sent to vs.


Here is a list of key constants to get you started:

    kResetEventID            = 3;
    kParametricPreference    = 4;
    kObjOnInitXProperties    = 5;
    kObjOnSpecialEditID        = 7;
    kObjOnObjectUIButtonHit    = 35;
    kObjOnReshape                 = 9;        {kObjOnDM_## events will be sent inside kObjOnReshape for VW 11.}

    kObjOnWidgetPrep             = 41;    {You'll need to include "vsoSetEventResult (-8);" at the end of the event block.}


  • Like 1

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.