Hi all . i want to launche my DLL but i want to add a parameter with it.
example :
>GC A
I know when autocad see a space it transform the pace in a Enter
My DLL can manage 8 collections so i want the user select on the command the number before launch my dll
and i want to selec the operation (ex : add, del etc..)
I have created 2 commands GSC for launch the config and GSG for the management
The two command launch the same DLL but how to add parameter ?
thx
Solved! Go to Solution.
Solved by Ed.Jobe. Go to Solution.
The only way to pass a parameter to a command is to use the LispFunction attribute, but LispFunctions can not be used to demand load your .dll (I'm pretty sure). So, you could automatically load on AutoCAD startup, and use the LispFunction, otherwise you'll need to just prompt for the inputs after the command starts.
It sounds like you have your dll set to demand load. Therefore, any command you have defined within it, will demand load the dll. So all you have to worry about is starting the correct command. You can use command macros, (part of the cui functionality) to specify keyword options of the command. Set up your command to use keywords. For example, you said you have 2 commands, GSC and GSG. When the user types in either one, the dll will demand load. If each command has options, then set up those options to be Keywords. For example when the user types GSC, they would be prompted:
Command: GSC
Command: Select an Option1, Option2 <Option1>:
Then you can create 2 menu macros in your cui, like the following:
CSC;Option1;
CSC;Option2;
so the best way is prompt for the inputs after the command starts
I don't want use macro. modifiy the cui is not very accurate. My dll is used on 6 pc. so i have to manage all the pc.
is mode accurate to copy the dll on each pc.
i dont know very well the command for deman the option from user but i have do to that.
thx all
You don't have to modify the cui. The users could do it themselves if they want to. Or you could just make multiple commands.
But as far as the cui goes, you should get used to it. I have 30 users. Don't modify their existing default cui, give them a partial cui just for your code. If you're going to create dll's with a bunch of commands, you should create a partial cui. It wouldn't be nice to expect the users to just remember what all your commands are and type them at the command line from memory. If you provide a partial cui, at least they could select it from a menu if they forgot what the command was called. If you can supply ribbon panels and toolbars, that's even better.
hi
i don't want use partial cui. My user are very not accurate with acad 😛
so i need to create a getselection with all my command when i launch the ddl. Is more accurate i think but now i dont know how ti create a such GetSelection with GetKeyword 😛
Can't find what you're looking for? Ask the community or share your knowledge.