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

appContextOpenDocument() and acad.exe /ld myarx

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
686 Views, 2 Replies

appContextOpenDocument() and acad.exe /ld myarx

Hi,
I wrote an arx which basically queues an initialization command with ads_queueexpr() while loading. Within this command (added with ACRX_CMD_TRANSPARENT | ACRX_CMD_SESSION flags), i want to open a DWG file. To do so, i check wether i'm in application context. If it's the case i simply call appContextOpenDocument(), otherwise i use executeInApplicationContext() and a helper to call appContextOpenDocument().

So far everything works fine. I'm happy.

Then i tried to use /ld switch to load my arx when acad.exe loads. Everything is still ok. My document is opened and i can work as i want.

Till now i used AutoCAD 2006 english, but my customers use AutoCAD 2006 italian, so i tested it with italian version and it's still ok when i load my arx manually, but as soon as i use /ld switch appContextOpenDocument() returns eFilerError.

So I formatted a test computer, installed both italian and english AutoCAD on the same machine. English works fine with /ld, but italian fails.

I even tried with the french version which fails as well. So i'm wondering if there is any difference between "original" and translated AutoCAD.

Any clues about this weird issue ?

Thanks !
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

I submitted my little worry to DevHelp. They admitted there is something wrong with AutoCAD. Here is a quote from their reply:

"""
Sorry that we cannot address your need immediately as it requires development work from our engineering team. We have logged this issue/wishlist as Change Request number 770391. We recommend that you make a note of this number for future reference. To check the status of this Change Request, please quote this number in a new Case submission and we will provide you with a status update. Change Request numbers should not be confused with Case Ids (as quoted in the subject line of emails from DevHelp) - they are assigned independently and have no direct relationship.
"""

So i'm waiting 🙂
Message 3 of 3
Anonymous
in reply to: Anonymous

I had no news from AutoCAD about this issue.
So i found a workaround. I had to write a loader, a small executable written in C# in my case, who does following steps:

1- write some keys in registry to autoload my ARX when AutoCAD loads
2- launch AutoCAD
3- wait a few seconds
4- remove the keys i wrote in registry (to allow AutoCAD to be launched without my ARX)
5- quit the loader

You may find more information about what keys to write in ObjectARX Reference by searching "Creating AutoCAD Subkeys and Values".

It's not a really nice solution, but it works fine for me.

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

Post to forums  

Autodesk Design & Make Report

”Boost