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

run (command...) from invoked lisp?

2 REPLIES 2
Reply
Message 1 of 3
JamesMaeding
488 Views, 2 Replies

run (command...) from invoked lisp?

I still have some code in my lisp functions that use (command.....).

I want to call some of those functions from my palette, and am getting the "command rejected..." message.

 

I read you need to set commandflags.modal or session to do this, but that only seems applicable when you are defining a command via .net.

I am not defining a command, the dialog is invoking the lisp.

 

Most examples are oriented around calling the commands straight from .net, so I have not found a similar situation to compare to.

Part of my need to do certain activities in lisp is my xdata attachment mechanism is complex and written in lisp (but does not use command calls itself)

I may have to split up activities if (command....) cannot be called from an invoked lisp, and draw using .net and then transfer to lisp to finish off...

thx


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

2 REPLIES 2
Message 2 of 3
Balaji_Ram
in reply to: JamesMaeding

Hi James,

 

Can you please try the code snippet from this blog post ?

 

http://adndevblog.typepad.com/autocad/2015/04/calling-lisp-commands-from-palette.html

 

The context becomes important if you have (command-s ...) calls in your Lisp code that is being invoked from .Net code.

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 3
JamesMaeding
in reply to: Balaji_Ram

finally got back to this.

I am supporting back to acad 2013, so must use sendstringtoexecute.

Only problem is I am sending a huge set of parameters to the routine to do the drawing.

Sometimes its thousands of points, all serialized to string so way too much.

 

I will have to make the ents with entmake instead.I am using


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report