I want to modify it so that the point where the object is selected is NOT used as the first breakpoint.
Saqib
Main Topics
Browse All TopicsI am trying to modify autocad's break command to suit my needs. When Autocad's command is issued then it prompts to select a line and a pick box is displayed. It allows selection of only one entity. When I try to do the same thing using VBA's selectonscreen command then the object selection prompt is displayed and you can continue to pick objects until you right-click to end the selection process. Can anyone tell me how to program for a one-object selection?
Saqib
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I thought that is what you might be doing. I did the same thing using a button macro like this:
^C^C_break \_f
They way I actually have it setup is to use the same point for both breakpoints like this:
^C^C_break \_f \@
I looked at doing this using the sendcommand in vba but I dont think it works right, from the help file about the sendcommand method:
<This method is generally synchronous. However, if the command sent with this method requires any user interaction (such as picking a point on the screen) then this method will continue as soon as the user input begins. The command will then continue to be processed asynchronously. >
I didnt have any luck finding out how to stop the selectonscreen method without rightclicking or hitting enter either, not saying it cant be done but if it can, they did a good job of hiding it. This solution may not be the vba one you were looking for but it should work and is relatively low tech, and chances are that you would use a button or palette to run your code anyway, this should work in either one.
If I come across anything else I'll post it.
Good luck, hth and Happy New Year.
Thanks, Norrin, and many more happy new years to you too.
I am aware of the button macro. But I normally invoke commands by the keyboard instead of the mouse. So this would not be very useful for my needs. Thanks anyway.
Darren, I did try the selectatpoint method but this provides cross-hairs instead of the pickbox. This is not very comfortable for object selection.
Saqib
well if you dont get your vba solution your could try to add the macro to your keyboard shortcuts in the cui. I just added it to mine using ctrl+b seems to work pretty good.
Seems like there's another way to do that too.
Or you may look see if the getentity method will work for you:
ThisDrawing.Utility.GetEnt
seems like that is a single selection method.
good luck
ssaqibh:,
A little clarification, "SelectAtPoint" doesn't display crosshairs because it's not an interactive command, It takes a point arguement. How you get that point is completely up to you. Using GetPoint (the most logical) does produce the crosshairs. As Norrin_Radd suggested, GetEntity does provide the same interaction (pickbox only) as your original question requested.
Sorry I didn't read that more carefully, I was focusing on a "single selection" and ignored the "pickbox" part of your inquiry. Good catch Norrin_Radd.
Business Accounts
Answer for Membership
by: norrin_raddPosted on 2008-12-30 at 11:40:58ID: 23265267
are you using "sendcommand" to run the break command? what exactly are you modify the command to do?