Unable to load *.scr file in Accoreconsole

Unable to load *.scr file in Accoreconsole

soonhui
Advisor Advisor
655 Views
2 Replies
Message 1 of 3

Unable to load *.scr file in Accoreconsole

soonhui
Advisor
Advisor

For some reason, I can't load *.scr in Accoreconsole, but I can do that no problem in acad.exe

 

This is the argument I pass to Accoreconsole:

 

 

 

 

/ld "D:\Program Files\Autodesk\AutoCAD 2023\\AecBase.dbx" /p "<<C3D_Metric>>" /product "C3D" /b "C:\Users\User\Documents\Projects\MES\MiTS2\Civil3DIntegrator\Test\AutoNetLoadCoreConsole2023.scr"

 

 

 

 

And this is my *.scr content:

 

 

 

netload "C:\Users\User\Documents\Projects\MES\MiTS2\Civil3DIntegrator\Test\bin\Debug\2023\MES.Civil3DIntegratorTest.dll"
RunCADtests

 

 

 

 

Taking inspiration from this post, I've also tried to set TrustedPaths via *.scr content

 

 

 

SET TRUSTEDPATHS="C:\Users\User\Documents\Projects\MES\MiTS2\Civil3DIntegrator\Test\bin\Debug\2023"

netload "C:\Users\User\Documents\Projects\MES\MiTS2\Civil3DIntegrator\Test\bin\Debug\2023\MES.Civil3DIntegratorTest.dll"

RunCADtests

 

 

 

 

And still, it doesn't work. In both cases, the netload statement already fails ( or before).

 

Here's the content of the output:

 

edirect stdout (file: C:\Users\User\AppData\Local\Temp\accc172362).
AcCoreConsole: StdOutConsoleMode: processed-output: enabled,auto
AutoCAD Core Engine Console - Copyright 2022 Autodesk, Inc.  All rights reserved. (T.114.0.0)

Execution Path:
D:\Program Files\Autodesk\AutoCAD 2023\accoreconsole.exe
Current Directory: C:\Users\User\Documents\Projects\MES\MiTS2\Civil3DIntegrator\Test\bin\Debug\2023

Version Number: T.114.0.0 (UNICODE)

Usage:
AcCoreConsole.exe [/i <input dwg>] /s <script> [/product <product>] [/l <language>] [/isolate <userid> <userDataFolder>] [/readonly] [/p[rofile] <profile>] [/loadmodule <module>]

Example:
AcCoreConsole.exe /i 8th_floor.dwg /s test.scr /l en-US
LogFilePath has been set to the working folder.
Loading AEC Base...
Loading AECC Base...

Loading Modeler DLLs.
Loading AECC Building Site...
Loading AECC Land...
Loading AEC Base Extended...
Loading AEC Core...
Loading AECC Base Core...
Loading AECC QTO......
Loading AECC Survey...
Loading AECC Roadway...
Loading AECC Pipe Part...
Loading AECC Pipe Network...
Loading AECC Pressure Pipes...
Loading AECC DwgIndxExtractor...
Loading AEC Project Base...
Loading AEC Schedule...
Loading AECC Plan Production...
Loading AEC Architectural Base...
Loading AecCivilBase...
Loading AECC Point Cloud...
Loading AECC Hydrology...
Loading AeccBridge130...
Loading AECC Rail...
Regenerating model.
.
**** System Variable Changed ****
1 of the monitored system variables has changed from the preferred value. Use SY1 of the monitored system variables has changed from the preferred value. Use SYSVARMONITOR command to view changes.


AutoCAD menu utilities loaded.
Command:
Command:

Command:
Command:

 

Any idea why?

##########

Ngu Soon Hui

##########

I'm the Benevolent Dictator for Life for MiTS Software. Read more here


I also setup Civil WHIZ in order to share what I learnt about Civil 3D
0 Likes
Accepted solutions (1)
656 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant

You cannot directly use the NETLOAD command in a script because because it uses a dialog to get the file name from the user.

You have to embed it in a LISP expression:

(command "netload" "C:\\Users\\User\\Documents\\Projects\\MES\\MiTS2\\Civil3DIntegrator\\Test\\bin\\Debug\\2023\\MES.Civil3DIntegratorTest.dll")


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 3

soonhui
Advisor
Advisor
Accepted solution

Silly me! The problem was because I specify the argument wrongly, it should be 

 

/ld "D:\Program Files\Autodesk\AutoCAD 2023\\AecBase.dbx" /p "<<C3D_Metric>>" /product "C3D" /s "C:\Users\User\Documents\Projects\MES\MiTS2\Civil3DIntegrator\Test\AutoNetLoadCoreConsole2023.scr"

 

 

Note that the argument should be /s and not /b for accoreconsole.exe

##########

Ngu Soon Hui

##########

I'm the Benevolent Dictator for Life for MiTS Software. Read more here


I also setup Civil WHIZ in order to share what I learnt about Civil 3D
0 Likes