.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Looking for a best way for Get Selection of User

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
AubelecBE
453 Views, 5 Replies

Looking for a best way for Get Selection of User

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

 

 

5 REPLIES 5
Message 2 of 6
chiefbraincloud
in reply to: AubelecBE

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.

Dave O.                                                                  Sig-Logos32.png
Message 3 of 6
Ed.Jobe
in reply to: chiefbraincloud

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;

Ed

EESignature

Message 4 of 6
AubelecBE
in reply to: chiefbraincloud

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

 

 

Message 5 of 6
Ed.Jobe
in reply to: AubelecBE

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.

Ed

EESignature

Message 6 of 6
AubelecBE
in reply to: Ed.Jobe

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.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost