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

Lock an Instance of AutoCAD object

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
AlexSu
562 Views, 7 Replies

Lock an Instance of AutoCAD object

Hi Everyone!

 

My question is kind of simple. How do I lock down an AutoCAD instance object that I created? This is so that the AutoCAD instance that I created can work in the background without responding to user if they open up another drawing. That drawing that the user open has to be opened in another AutoCAD instance.

Something similar in Excel is Application.IgnoreRemoteRequests.

 

Thanks,
Alex

Regards,
Alex Su
Autodesk Autocad & Inventor 2012 Certified Pro
Autodesk Inventor 2012 Certified Instructor (ACI)
Autodesk Inventor 2012 Certification Evaluator (ACE)
7 REPLIES 7
Message 2 of 8
jeff
in reply to: AlexSu

write some code that will create a script file and feed it to accoreconsole.exe

You can also find your answers @ TheSwamp
Message 3 of 8
AlexSu
in reply to: jeff

Hi Jeff,

 

Thanks for the response! Accoreconsole.exe seems to be a very good solution for batch processing and for what I'm doing.

I will try to find out more about this Accoreconsole and try to work in that direction.

Did not know that something like this exists! Thanks!

Regards,
Alex Su
Autodesk Autocad & Inventor 2012 Certified Pro
Autodesk Inventor 2012 Certified Instructor (ACI)
Autodesk Inventor 2012 Certification Evaluator (ACE)
Message 4 of 8
jeff
in reply to: AlexSu

At bottom of post at link below is a attachment that was for an example to run one instance for each core and start another when one finishes, to show a problem having that caused active program to lose focus whenever a new instance was started.

 

http://www.theswamp.org/index.php?topic=41948.msg471132#msg471132

You can also find your answers @ TheSwamp
Message 5 of 8
AlexSu
in reply to: jeff

Hi Jeff,

 

Thank you for your reply. I will go through the code that you posted in that forum and study it. I already have code that does multithreading on multiple AutoCAD instances (5 to be exact) and does the job independant of each other (each receives command and data from network clients to process drawings). That's why I want to lock all those instances so that user can't accidentally make one of those instances visible. Imagine running 5 instances of full AutoCAD in the background... takes up 1GB of ram even when it's not doing anything. This accoreconsole might just be what I needed as an alternative although I'm not too sure at this point that this will work or not for what I'm trying to acheive but It's worth a try. Thanks again!

Regards,
Alex Su
Autodesk Autocad & Inventor 2012 Certified Pro
Autodesk Inventor 2012 Certified Instructor (ACI)
Autodesk Inventor 2012 Certification Evaluator (ACE)
Message 6 of 8
jeff
in reply to: AlexSu

Just so you know if a drawing is open accoreconsole will open it and just sit there so you might want to first try to open a filestream with noshare, but once closed still coud get opened before accoreconsole opens it.

You can also find your answers @ TheSwamp
Message 7 of 8
jeff
in reply to: jeff

The previous example probably not a good example to look at it and was more for producing the side effects

 

This woud be better

 

http://adndevblog.typepad.com/autocad/2012/04/getting-started-with-accoreconsole.html

 

You can also find your answers @ TheSwamp
Message 8 of 8
AlexSu
in reply to: jeff

Hi Jeff,

Thanks for the reminder. I normally finish creating the drawing first before saving it to a file, that way there's no way that the use could open that drawing which is still processing but I'll keep this in mind though.

Regards,
Alex Su
Autodesk Autocad & Inventor 2012 Certified Pro
Autodesk Inventor 2012 Certified Instructor (ACI)
Autodesk Inventor 2012 Certification Evaluator (ACE)

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