LarryO Posted January 5, 2018 Share Posted January 5, 2018 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 :-) Quote Link to comment
Pat Stanford Posted January 6, 2018 Share Posted January 6, 2018 The event codes are found in the Vectorworks SDK documentation. You would have to download the SDK and dig around there to find them all. But that is probably not useful as very few of the events are accessible. Check out the article on VectorLab for more information. http://www.vectorlab.info/index.php?title=Events Quote Link to comment
Miguel Barrera Posted January 6, 2018 Share Posted January 6, 2018 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. Quote Link to comment
LarryO Posted January 7, 2018 Author Share Posted January 7, 2018 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. Quote Link to comment
JBenghiat Posted January 15, 2018 Share Posted January 15, 2018 That level of UI modification isn't possible, and the buttons are generated by the OS, not image based. Generally, they are designed for things like opening a dialog or forcing a refresh. The checkbox is going to be your best UI option. Quote Link to comment
Recommended Posts
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.