Jump to content
Developer Wiki and Function Reference Links ×

Index of Events - Where is it found??


LarryO

Recommended Posts

Other than pouring through the examples to extract the typical event index numbers,

where does one find a complete list of the predetermined event indices?

I could not find the list in the vectorscript appendices.

Or have I got the concept wrong and these are all constants which the script must define as required?

In which case I should be seeking out a list of constants used for event tracking.

 

Will an error be generated if your button ID is the same as another event? (newbie question :-)

Link to comment

In order to parse the events, you will need to call

 vsoGetEventInfo(
               outObjEvent    :;
               outEventData   :);

the first variable is the event number, and the second is additional info on the event. In the case of a button hit, the second variable will be the button id that you assigned when the button was created so there is no error generated if the button has the same id as an event. As a practice however, I do start buttons in the 1001 range to avoid any conflict with buttons defined in vectorworks.

 

Link to comment

Thanks guys for the starter info.

I read through that vectorlab posting and the sdk manual. I tried a few snippets from the examples, but this is getting messier than I anticipated. It would seem that parameter visibility functionality is related to the index number of the parameters in the parameter dialog and not the parameter name. Leads to some strange/complex behaviours when populating the OIP and the order of the parameters is altered in the parameter dialog, particularly if button placement is not the last OIP item. I am concerned that all the extra code required to track and maintain consistency of appearance in the OIP is going to bog down the user experience if many instances of my PIO are placed in the drawing environment.

 

All I really wanted was a two state button, depressed / not depressed, that doesn't resemble a check box. ie: a boolean that looks like a button with the alternate name showing up on the button. I easily figured out how to reset the boolean at the end of the PIO script, but changing its appearance to make it appear more intuitive (like a push button switch) stumped me.

Link to comment
  • 2 weeks later...

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