Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: -PLOT Script AcCoreConsole

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

    Default -PLOT Script AcCoreConsole

    Hi,

    Apologies there isn't a correct forum for my script query.

    I have a .scr that runs in AcCoreConsole to plot the drawing.

    Code:
    PDFSHX
    0
    -PLOT
    No
    
    
    DWG to PDF.pc3
    "C:\path\drawing.pdf"
    N
    Y
    CLOSE
    This has been working fine, but now coming across some drawings with an issue.

    Stepping through the script manually in AcCoreConsole I see where the problem is:

    Code:
    Enter a layout name or [?] <Model>:
    The drawing has a Model space and 1 layout space called Border @A3, if I type ? AcCoreConsole lists Layout1 and Layout2 which don't exist.

    If I open the drawing and enter the commands in there I get the correct prompt:

    Code:
    Enter a layout name or [?] <Border @A3>:
    I'm scratching my head so any help would be greatly appreciated, thank you.


    Edit: I've just tried adding extra Layouts and AcCoreConsole still only lists Layout1 and Layout2.

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,203
    Login to Give a bone
    0

    Default Re: -PLOT Script AcCoreConsole

    Have you tried setting the desired layout current? It could be the "@" symbol affecting this or even the spacing in the layout name. You may need to surround the layout name in quotes.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

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

    Default Re: -PLOT Script AcCoreConsole

    Opie, thanks for your response.

    I've just tried this, but in AcCoreConsole it doesn't even recognise that Layout "Border @A3" exists, it lists Layout1 and Layout2 for some reason which don't exist.

    When I run CTAB and then type "Border @A3" it says cannot set CTAB to that value.

    I've just done some testing, and the only way I'd been able to get AcCoreConsole to see the correct layouts was to remove all layouts and allow it to automatically create a new Layout1, which now is accessible in AcCoreConsole.

    We've got hundreds of drawings that could be like this that I need to use in AcCoreConsole, is there a way to automatically validate all layouts or something so they initialise correctly for AcCoreConsole to read?

    Thank you

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

    Default Re: -PLOT Script AcCoreConsole

    Try including the following in your script which seems to work for me at least with my test drawing that contains a layout tab named: "Border @A3"
    But if it still doesn't work then can you share a sample dwg that accoreconsole has trouble seeing "Border @A3"?
    Code:
    (foreach x (dictsearch (namedobjdict) "acad_layout")(if (and (= (car x) 3)(= (cdr x) "Border @A3"))(setvar 'ctab (cdr x))))
    Attached Images Attached Images

  5. #5
    Member
    Join Date
    2025-01
    Posts
    21
    Login to Give a bone
    0

    Default Re: -PLOT Script AcCoreConsole

    PaulLi_apa, thanks for the reply.

    I ran that command, it didn't give me "Regenerating layout." it just went to Command:

    Also, some of the drawings might be A2 or A1 so explicitly using "Border @A3" wouldn't be ideal.

    Why would it see the layout fine in the AutoCAD console, but in AcCoreConsole it doesn't?

    Thank you

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

    Default Re: -PLOT Script AcCoreConsole

    I'm not sure why accoreconsole won't see that layout because when I manually added that layout using the exact name as a test on a blank new drawing it saw it and set that as the current layout and then did a qsave as you saw in my screen shot.
    What happens when you try doing the same by added that layout name on a new drawing?
    Again if you can share a sample dwg with that layout name which accoreconsole doesn't recognize then I can test using that same dwg on my end.

  7. #7
    Member
    Join Date
    2025-01
    Posts
    21
    Login to Give a bone
    0

    Default Re: -PLOT Script AcCoreConsole

    Here is an example file.

    Edit: just seen your reply, thanks a lot for your time and help on this. Something seems weird that AcCoreConsole thinks there's a Layout1 and Layout2. I look forward to your results with my file.
    Attached Files Attached Files
    Last edited by squatman; 2025-03-19 at 06:58 PM.

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

    Default Re: -PLOT Script AcCoreConsole

    Well your exampleA3.dwg already has Border @A3 set as current so that's why when you run accoreconsole you don't see a regenerating layout response.
    I set Model current, save & close out of the dwg and then ran my batch file which launches accoreconsole on the now modified exampleA3.dwg and the screenshot now shows the regenerating layout
    ScreenShot.png

    Then when I open the exampleA3.dwg the Border @A3 is set as the current layout tab.
    I've tried both in AutoCAD 2020 & 2025 (with all the updates installed) accoreconsole encountered no issues.
    What version of AutoCAD have you tried this on?

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

    Default Re: -PLOT Script AcCoreConsole

    Consider leveraging the native Autopublish mechanism to automagically plot all layouts via Core Console:

    Script (.SCR):
    Code:
    (setvar 'automaticpub 1)
    (command ".QSAVE")


    Separately, if you actually need to iterate layoutlist in Core Console:

    https://www.theswamp.org/index.php?t...9440#msg609440

    Quote Originally Posted by BlackBox
    Quote Originally Posted by VovKa
    Quote Originally Posted by jmcshane
    I'm thinking it might be based on ActiveX which isn't supported in acoreconsole as far as I know.
    (layoutlist) is defined inside acapp.arx which is not loaded by acoreconsole
    So simply load it in the Script:

    Code:
    _.arx L "acapp.arx"
    (setq foo (layoutlist))
    Core Console supports loading ARX/.NET assemblies.

    Cheers

    2022-03-30_06-58-57.png
    "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

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

    Default Re: -PLOT Script AcCoreConsole

    very nice...thanks for both tips...cheers!!!

Page 1 of 3 123 LastLast

Similar Threads

  1. Script > load LISP > run command in AcCoreConsole
    By atomicpetrie823619 in forum AutoLISP
    Replies: 3
    Last Post: 2025-02-11, 09:26 PM
  2. 2013: accoreconsole process - is it AutoCAD?
    By 3dway in forum AutoCAD General
    Replies: 7
    Last Post: 2013-02-21, 09:01 PM
  3. Plot via a script file from a toolbar
    By robert.1.hall72202 in forum AutoCAD Customization
    Replies: 10
    Last Post: 2007-04-05, 10:54 PM
  4. Pause for Window selection in Plot script
    By kastmiler in forum AutoCAD Customization
    Replies: 4
    Last Post: 2007-04-03, 05:52 PM
  5. Plot 2 No Copies. 1st Plot is ok! 2nd Plot moves on the paper.
    By gianluca.giusti in forum AutoCAD Plotting
    Replies: 1
    Last Post: 2006-05-18, 11:02 AM

Posting Permissions

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