Results 1 to 4 of 4

Thread: Script > load LISP > run command in AcCoreConsole

  1. #1
    Member
    Join Date
    2025-01
    Posts
    15
    Login to Give a bone
    0

    Question Script > load LISP > run command in AcCoreConsole

    Hi,

    I have a SCRIPT file that loads a LISP file and runs the defined COMMAND.

    In AutoCAD if I select Run Script and select test.scr it works fine.

    If I run the script with AcCoreConsole I get:
    Unknown command "TESTING"
    test.scr
    Code:
    (load "C:\\_test\\test.lsp")
    TESTING
    test.lsp
    Code:
    (defun c:testing ()
      (princ (strcat "test complete"))
      (princ)
    )
    BAT file to run AcCoreConsole
    Code:
    start "" "C:\Program Files\Autodesk\AutoCAD 2019\accoreconsole.exe" /i "C:\Users\user\Desktop\A3.dwg" /s C:\_test\test.scr
    AcCoreConsole output
    Code:
    Redirect stdout (file: C:\Users\user\AppData\Local\Temp\accc296442).
    AcCoreConsole: StdOutConsoleMode: processed-output: enabled,auto
    AutoCAD Core Engine Console - Copyright 2018 Autodesk, Inc.  All rights reserved. (P.46.0.0)
    
    Execution Path:
    C:\Program Files\Autodesk\AutoCAD 2019\accoreconsole.exe
    
    Version Number: P.46.0.0 (UNICODE)
    Regenerating layout.
    
    Regenerating model.
    **** System Variable Changed ****
    1 of the monitored system variables has changed from the preferred value. Use SYSVARMONITOR command to view changes.
    Command:
    Command:
    Command:
    Command: (appload "C:\\_test\\test.lsp")
    Command: TESTING
    Unknown command "TESTING".  Press F1 for help.
    Command: _.quit
    Any help would be really appreciated, thank you.

  2. #2
    Active Member
    Join Date
    2015-10
    Location
    Alhambra
    Posts
    57
    Login to Give a bone
    0

    Default Re: Script > load LISP > run command in AcCoreConsole

    Odd that your script uses the load function:
    Code:
    (load "C:\\_test\\test.lsp")
    But when this is shown in the accoreconsole window is using the appload command:
    Code:
    (appload "C:\\_test\\test.lsp")
    What if you change your script file to this:
    Code:
    (load "C:\\_test\\test.lsp")
    (C:TESTING)
    Also in AutoCAD under Options>Files make sure under Support File Search Path & Trusted Locations you've added folder: C:\_test
    Options-Support.png

  3. #3
    Member
    Join Date
    2025-01
    Posts
    15
    Login to Give a bone
    0

    Default Re: Script > load LISP > run command in AcCoreConsole

    PaulLi_apa you legend, it was the Trusted Locations. Interesting that it works fine manually from that loading within the AutoCAD UI.

    The reason "appload" was on the accoreconsole was just me testing and I happened to copy that test for my forum post.

    Thanks for your response and time.

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,766
    Login to Give a bone
    0

    Default Re: Script > load LISP > run command in AcCoreConsole

    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 5860, Xeon W7-2495X, 128GB RAM, Dual PCIe 4.0 M.2 SSD (RAID 0), 20GB NVIDIA RTX 4000 ADA

Similar Threads

  1. 2013: accoreconsole process - is it AutoCAD?
    By 3dway in forum AutoCAD General
    Replies: 7
    Last Post: 2013-02-21, 09:01 PM
  2. Run a Script file from a CUI Ribbon button command
    By MarcusLintault in forum AutoCAD Customization
    Replies: 2
    Last Post: 2012-10-12, 01:14 PM
  3. Using Script to run Multipul LISP
    By Zuke in forum AutoLISP
    Replies: 2
    Last Post: 2008-05-30, 05:03 AM
  4. Replies: 2
    Last Post: 2006-10-25, 09:10 PM
  5. Unable to run a script on "dview" command
    By jakob_k in forum AutoCAD Customization
    Replies: 5
    Last Post: 2006-10-14, 03:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •