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

Need to run LISP function synchronously from .NET across multiple drawings

1 REPLY 1
Reply
Message 1 of 2
odoshi
1507 Views, 1 Reply

Need to run LISP function synchronously from .NET across multiple drawings

I am using the Application.Invoke() method on 2011+ and am finding it to not work well other than from the command line of a single document.

 

When I declare a Commandflag.Session flag for my command, and try calling Invoke using more than one parameter on a new drawing where the command was not run from, it bombs out.

 

So, Drawing1.dwg - Run command

 

A new Drawing2 is opened, saved, and Invoke called to run some LISP, it will fail.

 

Does anyone have experience with this?

 

I did read somewhere that Invoke() may need to be run from a Document context. Does that exclude the Session flag?

 

Thanks,

Mike

 

 

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
1 REPLY 1
Message 2 of 2
odoshi
in reply to: odoshi

Forget it 🙂

 

Using the Interop DLL's and SendCommand will work synchronously if CommandFlag.Session is used.

 

Doh!

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com

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