User Input Menu

User Input Menu

Anonymous
Not applicable
554 Views
6 Replies
Message 1 of 7

User Input Menu

Anonymous
Not applicable
when I type in imageframe I get a user input menu. How do I create a menu like that in VBA?
0 Likes
555 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
cadcam,

If you are talking about the Image manger if has a treeview control
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingtreeviewcontrol.asp

and a listview control
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconlistviewscenario1.as


In the VBA controls box just right click and add these two additional controls. There are lots of examples on the web on using these two controls together

Try MrExcel for general VBA and VBA controls question
Since there are so many more Excel users than Acad users you can find more more info there

http://www.mrexcel.com/board2/

Maximo
0 Likes
Message 3 of 7

Anonymous
Not applicable
I am talking about the command 'imageframe'. This turns off the frame box around images. After typing in the command, I get a command prompt to type in 0, 1, or 2. I also get a small pick menu to select either 0, 1, or 2. I want to know how can I create a that pick menu in my programs. I am using AutoCAD Mechanical 2006. It is sort of like Keyword except with a menu.
0 Likes
Message 4 of 7

Anonymous
Not applicable

It's a function of the Dynamic Input in
2006.  Any LSP program with a GETKWORD function in it will display
something similar to that.

 

I used the following snippet of code to create a similar
"menu".

 

(initget 1 "Add Select Elbow Rise droP Crossing Takeoff Damper
Vav settinGs eXit")
(setq strOption
(getkword "\n DUCT
[Add/Select/Elbow/Rise/droP/Crossing/Takeoff/Damper/Vav box/settinGs/eXit]:
<eXit> "))

 

[img src="@97398"]


--
Matt W
"What am I gonna do
with 40 subscriptions to Vibe?"

 

 

I am talking about the command 'imageframe'.
This turns off the frame box around images.  After typing in the command, I
get a command prompt to type in 0, 1, or 2.  I also get a small pick menu
to select either 0, 1, or 2. I want to know how can I create a that pick menu in
my programs.  I am using AutoCAD Mechanical 2006. It is sort of like
Keyword except with a menu.
0 Likes
Message 5 of 7

Anonymous
Not applicable
I'm sure you can do the same thing in VBA using the
ThisDrawing.Utility.GetKeyword. I've never done anything with that in VBA
so I can't supply a snippet to get you going. I'm sure if you do a search
for GetKeyWord you'll find plenty of examples.

Good luck.
--
Matt W
"What am I gonna do with 40 subscriptions to Vibe?"


wrote in message news:5049278@discussion.autodesk.com...
I am talking about the command 'imageframe'. This turns off the frame box
around images. After typing in the command, I get a command prompt to type
in 0, 1, or 2. I also get a small pick menu to select either 0, 1, or 2. I
want to know how can I create a that pick menu in my programs. I am using
AutoCAD Mechanical 2006. It is sort of like Keyword except with a menu.
0 Likes
Message 6 of 7

Anonymous
Not applicable
Displaying a "context sensitive menu" is automatic for lisp or vba. They key
is the formatting of your prompt for the GetKeyword method. In the picture
you posted, notice the how square brakets and slashes are used to delineate
the choices that are established using the InitializeUserInput method.

--
----
Ed
----
"Matt W" wrote in message
news:5049357@discussion.autodesk.com...
I'm sure you can do the same thing in VBA using the
ThisDrawing.Utility.GetKeyword. I've never done anything with that in VBA
so I can't supply a snippet to get you going. I'm sure if you do a search
for GetKeyWord you'll find plenty of examples.

Good luck.
--
Matt W
"What am I gonna do with 40 subscriptions to Vibe?"


wrote in message news:5049278@discussion.autodesk.com...
I am talking about the command 'imageframe'. This turns off the frame box
around images. After typing in the command, I get a command prompt to type
in 0, 1, or 2. I also get a small pick menu to select either 0, 1, or 2. I
want to know how can I create a that pick menu in my programs. I am using
AutoCAD Mechanical 2006. It is sort of like Keyword except with a menu.
0 Likes
Message 7 of 7

Anonymous
Not applicable
Thanks, that seemed to do the trick.
0 Likes