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

CommandMethod with custom params

1 REPLY 1
Reply
Message 1 of 2
alsecz
1380 Views, 1 Reply

CommandMethod with custom params

Hi All!

Somehow I would like to create a .NET module in which my autocad commands accept arguments. for example:
//Simple command
[CommandMethod("findblocks")]
public void FindBlocks()
{
//get all the blocks
}

//Argument accept command
[CommandMethod("findblock" & "agruments")]
public void FindBlock(string objHandle)
{
//get the block which Handle is objHandle
}

can somebody help how can I do the second CommandMethod?

Thanks,
G.
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: alsecz

Command methods can't take arguments, but LispFunctions can.

You can also script a Command Method with the LISP (command) function, if
the command method requests input from the user.

See the LispFunction attribute in the docs.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6271836@discussion.autodesk.com...
Hi All!

Somehow I would like to create a .NET module in which my autocad commands
accept arguments. for example:
//Simple command
[CommandMethod("findblocks")]
public void FindBlocks()
{
//get all the blocks
}

//Argument accept command
[CommandMethod("findblock" & "agruments")]
public void FindBlock(string objHandle)
{
//get the block which Handle is objHandle
}

can somebody help how can I do the second CommandMethod?

Thanks,
G.

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