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

Add-on for accoreconsole 2014

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
avinnik
1162 Views, 7 Replies

Add-on for accoreconsole 2014

Hello everybody,

 

We have developed an application, which is using 2013 accoreconsole with add-on. We are currently porting the mechanism to 2014.

We discovered that the add-on cannot be loaded into 2014 accore console, but can loaded it into AutoCAD 2014. Created another add-on from scratch -- still cannot load it into accoreconsole. Not sure how to handle this one. Any working examples I can use as a template?

 

Another issues -- not sure why, but I cannot execute accoreconsole process from another application and capture output.Either process execution fails or output cannot be captured. Any ideas how to resolve the issue? Working fine in 2013. Anything special about it 2014 version/DOTNET, etc.

 

Code executing accoreconsole:

 

ProcessStartInfo startInfo = new ProcessStartInfo(accoreconsole);
startInfo.Arguments = "/i " + Quoted(workFile) + " /s " + Quoted(script) + " /isolate";
 
 startInfo.UseShellExecute = false;


startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;
startInfo.CreateNoWindow = true;
startInfo.RedirectStandardInput = true;

Process p = Process.Start(startInfo);

 

Using Visual Studio 2010

 

Your help will be greatly appreciated.

 

Code to execute

 

Thanks,

A.V. 

 

 

7 REPLIES 7
Message 2 of 8
Balaji_Ram
in reply to: avinnik

Hi AV,

 

I have just tried loading a custom module in Accoreconsole in 2014 and it worked ok.

 

Not sure what could be missing at your end, so attaching the project that worked ok for me.

 

Can you please give it a try ? The script and batch file to run accoreconsole are also attached.

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 3 of 8
Alexander.Rivilis
in reply to: avinnik


@avinnik wrote:
... Using Visual Studio 2010 ...

 


What about testing with VS 2012 or 2013?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 4 of 8
jeff
in reply to: Alexander.Rivilis

avinnik ,

 

Can you double click on accoreconsole and it not error out?

 

 

Sorry to get off the topic a bit if not related.

 

 

Balaji_Ram,

you might be aware of this but thought I would share so you could log it or inform engineering team if you felt it was necessary.

 

 

I had problem with coreconsole(2013, 2014, & 2015) add-ins erroring out and noticed it also crash after a couple of seconds if I just double clicked on .exe

 

 

The fix I found was to uni-stall software called "Display Link" or "DisplayLinkManager"

The same software caused 2014 installation to fail and I think typicaly is found on laptops that gets installed from numerous different devices.

 

 

http://upandready.typepad.com/up_and_ready/2012/05/general-installation-dlumd32dll-displaylink-core-...

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

Executing accoreconsole from command line works fine.

 

I was able to overcome execution problem: forking accoreconsole using te code always throws an exception, but accoreconsole runs after that:

               // Start the new process

               ProcessStartInfo startInfo = new ProcessStartInfo(accoreconsole);

               startInfo.Arguments = "/i " + Quoted(workFile) + " /s " + Quoted(script) + " /isolate";

               startInfo.UseShellExecute = false;

               startInfo.RedirectStandardOutput = true;

               startInfo.RedirectStandardError = true;

               startInfo.CreateNoWindow = true;

               startInfo.RedirectStandardInput = true;

               Process p = Process.Start(startInfo);

               p.OutputDataReceived += new DataReceivedEventHandler(StandardOutputReceiver);

               p.BeginOutputReadLine();

               p.ErrorDataReceived += new DataReceivedEventHandler(StandardErrorReceiver);

               p.BeginErrorReadLine();

               p.WaitForExit();

 

After that our application reads stdout and stderr of accoreconsole

The problem is – that in 2013 it was UTF8 and 2014 the output is in wide characters

Execution using CreateProcess works fine (code is attached)

Loading add-on still need to be solved (sample code did not work) it is either accoreconsole version or referenced dlls

 

Thanks,

 

 

Message 6 of 8
Balaji_Ram
in reply to: avinnik

Hi AV,

 

Can you trying setting SECURELOAD to 0 or placing the dll in one of the trusted locations ?

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 7 of 8
Balaji_Ram
in reply to: jeff

Hi Jeff,

 

Thanks for sharing the workaround.

 

I dont seem to have the Display link manager software installed in my laptop. So it is little hard for me to reproduce the crash and report this problem to our engineering. Any suggestions on how to reproduce the crash ?

 

Regards,

Balaji



Balaji
Developer Technical Services
Autodesk Developer Network

Message 8 of 8
CADbloke
in reply to: Balaji_Ram

FYI I do have Displaylink manager and have not experienced this crash. I have the versions provided by Windows Update - I found the versions for the manufacturer could be unstable at times.
- - - - - - -
working on all sorts of things including www.tvCAD.tv & www.CADreplace.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