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

Create command with a "-" for the first character

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Jeff_M
436 Views, 3 Replies

Create command with a "-" for the first character

I'm wanting to create a command that can be invoked as a Dialog or at the command line, just as there are the commands "Layer" and "-Layer" (among many others). However, when I attempt this:

[CommandMethod("-MyCommand")]

the command is not recognized by Autocad. I've read through the .NET and ObjectARX docs and have been unable to find any mention of the "-" character not being a valid character to use. 

 

Any suggestions welcomed. (Yes, I know I can just create a similarly named command. I was hoping to mimic what Autocad does so the process will already be familiar to the end user.)

 

Thanks!

Jeff_M, also a frequent Swamper
EESignature
3 REPLIES 3
Message 2 of 4
_gile
in reply to: Jeff_M

Hi

 

Prefixing a .NET command with "-" always worked for me. Are you sure the "not recognized " is due to the command name ?



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 4
norman.yuan
in reply to: Jeff_M

@Jeff_M, I just recently posted something in my blog on this topic, and I have no problem to with code

 

[CommandMethod("-DoSothing")]

 

Norman Yuan

Drive CAD With Code

EESignature

Message 4 of 4
Jeff_M
in reply to: Jeff_M

Of course it works guys, thanks for verifying. Turns out the backup computer I'm using wasn't configured to send my Debug DLL's to the .bundle folder, so it was still loading old code. Once I reconfigured VS, all is well. Smiley Embarassed

Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report