Tobin1
Petroleum
- Nov 9, 2007
- 176
Howdy,
I’m having difficulty setting up a WithEvents structure. I’ve used one previously, but, this seems to be a little different. The code I used previously was triggered by a user selection on a drawing sheet (views, notes, sheet etc.). This time I need to get an event from a change in the Custom Properties (Summary Information, Custom tab). I’m not sure if it’s even possible, but, according to what I reading in the SW API help, I should be able to.
My goal is to run a form with a ListBox that displays all of the existing Custom Properties, then, while the form is still showing, allow the user to open (Shift + p) and change the Custom Properties, then, when that window is closed the ChangeCustomPropertyNotify function is triggered in the macro. I will use that event to update the ListBox to the revised Custom Properties (automatic update triggered by the change in the custom properties). I know I can make a button to do the update, but, wanted to make it automatic.
I’ve attached the macro I’ve been experimenting with. I have a feeling I’m either close or way off
.
Can someone help me set up this WithEvents structure?
Thanks
Tobin Sparks
I’m having difficulty setting up a WithEvents structure. I’ve used one previously, but, this seems to be a little different. The code I used previously was triggered by a user selection on a drawing sheet (views, notes, sheet etc.). This time I need to get an event from a change in the Custom Properties (Summary Information, Custom tab). I’m not sure if it’s even possible, but, according to what I reading in the SW API help, I should be able to.
My goal is to run a form with a ListBox that displays all of the existing Custom Properties, then, while the form is still showing, allow the user to open (Shift + p) and change the Custom Properties, then, when that window is closed the ChangeCustomPropertyNotify function is triggered in the macro. I will use that event to update the ListBox to the revised Custom Properties (automatic update triggered by the change in the custom properties). I know I can make a button to do the update, but, wanted to make it automatic.
I’ve attached the macro I’ve been experimenting with. I have a feeling I’m either close or way off
Can someone help me set up this WithEvents structure?
Thanks
Tobin Sparks