More Detail Regarding Locate Filter
I received an email from Paul wanting to know a little more about locate filters. Here's my reply.
You can find the complete pie example on my website in the C-A-D section. The download is called pie.zip and there is an article there that explains how to create pie.mvba. This article demonstrates how to develop a placement and edit (locate) command.
In this example command you will see that I didn't change the locate filter (see the class module classEdit). So it looks like this.
In this case the end user can select any element and the command will attempt to run.
But, since we only want the user to select pie symbols (in this case cells called PIE) we can use the filter to make this cell the only element in the design file the user can click on and accept. All other elements will do nothing when selected. The new filter might look something like this. . .
So, it makes the code a little more complicated, but it forces the end user to click on elements that only apply to your command. And you don't have to test the element type in the accept or in the dynamics functions because you already know what the element type is.
I hope that's not too much detail. I don't think this filter mechanism is obvious. It took me quite some time to recognize what it could do for my end user work flow. In fact, until recently I was only using it to prompt users to accept or reject. So, if you decide to ignore it for the moment your commands will work ok, but you may want to make a note to revisit the commands later after you have more experience with VBA. Good luck. Let me know if there is anything else I can do for you.



0 Comments:
Post a Comment
<< Home