AcCoreConsole Isolate Arguments

AcCoreConsole Isolate Arguments

larry.daubenspeck
Advocate Advocate
4,234 Views
19 Replies
Message 1 of 20

AcCoreConsole Isolate Arguments

larry.daubenspeck
Advocate
Advocate

My company just upgraded from 2021 to 2023.  My accoreconsole program quit working, and the 'apparent' reason is given in an output file, which reads in part:

     "Must pass isolate arguments: UserIdOrRegKey and UserDataFolder."

So, I created variables for both.  Now, the output file includes these two error messages

"ERROR: Failed to create missing user data folder: C:\Users\draftsman\AppData\Roaming\Autodesk\AutoCAD 2023\R24.2\enu"
"ERROR: Failed to create registry keys or files necessary when using the /isolate switch."

 

Not using the isolate switch doesn't seem to work either.  As a workaround, I had to go back to the 2019 version.  Is there anyone who has had success with the ACC and the new arguments for the /isolate switch, and is willing to share your secrets?  Thanks in advance!

Larry Daubenspeck
Software Programmer
Draper, Inc.
Accepted solutions (2)
4,235 Views
19 Replies
Replies (19)
Message 2 of 20

olivier.doucet
Participant
Participant

I experience a similar issue. Did you find a solution?

 

[UPDATE]
When I use /isolate option with username and a specific path, let's say:
/isolate %username% %somepath%
all the content of autocad install directory is copied over to %somepath% (which is close to 3GB!) before the command is run. Not so efficient...
And not even sure about the registry stuff.
Really confused about how to use /isolate.

 

Message 3 of 20

larry.daubenspeck
Advocate
Advocate

Hi Olivier,

 

No answers yet.  You're the first person to respond to my question.

Larry Daubenspeck
Software Programmer
Draper, Inc.
0 Likes
Message 4 of 20

larry.daubenspeck
Advocate
Advocate

Are there no AcCoreConsole experts out there?

Larry Daubenspeck
Software Programmer
Draper, Inc.
0 Likes
Message 5 of 20

SENL1362
Advisor
Advisor
Did you try to run AutoCAD itself, with that same login account, before running the AcCore?
I suspect that the Core Engine is trying to initialize the AppData (and Registry) and is not allowed to do so.
You'll need "Super User" rights to modify your HKCU registry.
Try to launch AcCore as (local) admin.
(Note: runas /Admin is not the same)

0 Likes
Message 6 of 20

larry.daubenspeck
Advocate
Advocate

Thank you for the suggestions.  We use AutoCad on this same computer as well, with no issues.  I'll look into the other suggestions.  Here is a question:  Regarding the userId, is this wanting the Id of who is logged into the computer, or is it wanting the Autodesk user id for the AutoCAD license being used?  They aren't necessarily the same.  And as for the user data folder, is the user supposed to match that of the UserId?

Larry Daubenspeck
Software Programmer
Draper, Inc.
Message 7 of 20

norman.yuan
Mentor
Mentor

Not to provide possible answer, just be curious.

 

In your first post, you did not say if the "/isolate " argument is used or not. If you used it, what exactly the arguments are used?

 

Then the questions is why you need to use that argument? Is your core console solution hosted in a service type application that opens to different client and you want it run in an isolated environment/sand box (similar to what the Forge Design Automation does)? Unless your business solution is services open to public, and having powerful server virtualization support, using /isolate argument is quite a burden to the server, as you found out. In this case, I'd definitely go with Forge app hosting, rather than hosting my own core console.

 

Just in case: running an exe that starts Acad core console 2020 to 2023 without /isolation in my computers works OK.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 8 of 20

larry.daubenspeck
Advocate
Advocate

Norman, thank you for your insights!  We use both AutoCad 2023 and the accoreconsole on the same computer, so I was using the /isolate switch to keep it from changing any system variables.  After reading your reply, I thought I'd try it without the /isolate switch.  By the way, am also redirecting to a temp file in order to read any feedback.  When using this line in my batch file:  

for /f "delims=" %%a IN ('dir %DWGINDIR% /b *.dwg') do %ACCOREEXE% /i %templatedwg% /s %script% > %tempfile%

I get this as feedback in the temp file:

"Unable to load C:\AcCoreUser\DLLs\DraftsmanAcCore.dll assembly."

When I change back to 2019, it works fine (but I'd really like to use 2023, as someday the license will run out).

Larry Daubenspeck
Software Programmer
Draper, Inc.
Message 9 of 20

norman.yuan
Mentor
Mentor
Accepted solution

You might want to add profile argument (/p) with a profile that is valid for the running user account, and make sure the dll is located in one of the trusted locations listed in that profile.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 10 of 20

SENL1362
Advisor
Advisor

Hi Larry,

used the /isolate switch, with the following userid and datafolder:

..\accoreconsole.exe ... /isolate "abc" "c:\temp\AcCore"

It will create HKCU\Software\AppDataLow\Software\Autodesk\..\CoreUser\abc

and the folders c:\temp\AcCore\(Local,Roaming and Temp)

 

Unfortunately this take some time (everytime) to create these folders.

A better alternative would be to use a different profile  (/p  "abc.arg")

0 Likes
Message 11 of 20

larry.daubenspeck
Advocate
Advocate

Thank you!  Both you and Norman have mentioned using a different profile.  Can you elaborate?  Is this is lieu of the /isolate switch?  How do you use this?  I guess I'm a little dense!

Larry Daubenspeck
Software Programmer
Draper, Inc.
Message 12 of 20

SENL1362
Advisor
Advisor

Start AutoCAD

Configur the AutoCAD session.

Export the Profile into *.arg

Start AcCoreConsole.exe .../p ArgPathname

 

0 Likes
Message 13 of 20

larry.daubenspeck
Advocate
Advocate

Ok, so in AutoCad, I went into Options-->Profiles and renamed the profile currently being used as AcCoreUser.  I exported this to C:\Users\draftsman\Documents\AcCoreUser.arg.

Then, in my batch file, I have…

set AcCoreProfilePath="C:\Users\draftsman\Documents\AcCoreUser.arg"

And then…

for /f "delims=" %%a IN ('dir %DWGINDIR% /b *.dwg') do %ACCOREEXE% /i %templatedwg% /s %script% /p %AcCoreProfilePath% > %tempfile%

 

Still getting “Unable to load C:\AcCoreUser\DLLs\DraftsmanAcCore.dll assembly.”  Am I using this correctly?  Do I need to use any other switches, or put them in a different order?  Sorry for all the questions.

Larry Daubenspeck
Software Programmer
Draper, Inc.
0 Likes
Message 14 of 20

SENL1362
Advisor
Advisor
Accepted solution

No need to be sorry, we've been there once 🙂

There might be a few reasons why this dll doesn't get loaded:

1. For instance it might be BLOCKED by Windows. Have you checked that? (FileProperties/UNBLOCK)

2. How about trusted locations? Starting AcCore and then use Netload?

 

 

 

0 Likes
Message 15 of 20

larry.daubenspeck
Advocate
Advocate

Thank you Norman!  Trusted Locations did the trick.  It worked fine in 2019, but 2023 did not until I added the DLL path.

Larry Daubenspeck
Software Programmer
Draper, Inc.
0 Likes
Message 16 of 20

larry.daubenspeck
Advocate
Advocate

Hurray!  You and Norman hit the nail on the head with the Trusted Locations.  It worked fine in 2019, but 2023 wants the DLL path in the Trusted Location.  Thanks again!

Larry Daubenspeck
Software Programmer
Draper, Inc.
0 Likes
Message 17 of 20

larry.daubenspeck
Advocate
Advocate

Olivier, see the later posts.  You can avoid the need for the /isolate switch by defining a new profile within AutoCad and exporting it, then by using the /profile switch.    Also, adding my DLL to the Trusted Locations (within the new profile) did the trick. 

Larry Daubenspeck
Software Programmer
Draper, Inc.
Message 18 of 20

Ceorl82
Contributor
Contributor

I've exported a profile and my bat file is utilizing it, but remains permanent.  The next time I open AutoCAD the profile is still set to the profile my bat file called out.  Anyone know of a way to stop this?  The CProfile variable in AutoCAD is readonly.

Thanks

0 Likes
Message 19 of 20

pari_dhanakoti
Enthusiast
Enthusiast

Hi,

Following this along, how do I create a profile via script? is it possible? The reason I ask is for my usecase accoreconsole.exe is going to be initiated programatically (from .Net code / via .bat file). I dont want to change the system variables every time accoreconsole.exe is going to be executed. So I was looking at /isolate switch and /p (profile) as an alternative.

 

It appears from above discussion /p is the way to go, but I want to create this profile ahead of running my program, so that the command will use the right one when I pass the profile name in /p switch.

0 Likes
Message 20 of 20

norman.yuan
Mentor
Mentor

You start AutoCAD (desktop) and to run command "OPTIONS" to open options dialog, where you can create a new user profile with desired name, and add folder path to Trusted Locations. You may want to set up other options for this profile. 

 

Once the options dialog box is OKed, the profile will be available for the current user (yourself, obviously). If you run the core console with your user account (i.e. in your computer where you log into), simply specify the /p switch with the profile name will do. However, if the the core console could run with other user account, then you need to export the profile as *.arg file, and specify the /p switch with the full path of the saved profile (*.arg) file. So, when the core console/AutoCAD starts under a different user account the first time in the computer, AutoCAD will try to see if the specified profile (the file name of the *.arg file without path and file name extension) for that user account is available or not. If not, AutoCAD/core console will read the *.arg file to create the profile (i.e. import the profile).

 

HTH.

 

Norman Yuan

Drive CAD With Code

EESignature