acad core sonsole not running lisp

acad core sonsole not running lisp

lisaj98052
Enthusiast Enthusiast
1,838 Views
9 Replies
Message 1 of 10

acad core sonsole not running lisp

lisaj98052
Enthusiast
Enthusiast

Tying to run this in acad coreconsole 2018 but 

with this bat and script: it prints the file but fails to update the attributes, not sure what it causing it to not work. the lisp works fine outside of the coreconsole enviroment.

 

Any ideas on what I'm doing wrong? Thanks

------------------------------------------------------

error message:

Command: (load "c:\\cadd\\AutoCad\\Support\\Lisp\\UTB-Attributes.lsp")
Error: no function definition: VLAX-GET-ACAD-OBJECT
Command: (command "-plot" "y" "" "DWG to PDF" "ANSI full bleed D (22.00 x 34.00 Inches)" "inches" "landscape" "no" "window" "0,0" "34,22" "1:1" "0,0" "y" "611110ctb" "yes" "yes" "no" "no" "" "no" "yes")
-plot Detailed plot configuration? [Yes/No] <No>: y

 

 

-----------------------------------------------------------------------------

bat:

FOR %%f IN ("C:\CADD\projects\611110\sheets\*.dwg") DO "C:\Program Files\Autodesk\AutoCAD 2018\accoreconsole.exe" /P "C:\Program Files\Autodesk\AutoCAD 2018\acad.exe" /product ACAD /language "en-US" /p "C:\CADD\profiles\AcadLC2018.arg" /i "%%f" /s "C:\CADD\Projects\611110\printing\print.scr" /l en-US

-----------------------------------------------------------------------------------

script:

 

(load "c:\\cadd\\AutoCad\\Support\\Lisp\\UTB-Attributes.lsp")
(c:UpdateTitleblocks)
(command "-plot" "y" "" "DWG to PDF" "ANSI full bleed D (22.00 x 34.00 Inches)" "inches" "landscape" "no" "window" "0,0" "34,22" "1:1" "0,0" "y" "611110ctb" "yes" "yes" "no" "no" "" "no" "yes")
(command "quit" "y")

0 Likes
1,839 Views
9 Replies
Replies (9)
Message 2 of 10

maratovich
Advisor
Advisor

Maybe this will help you - AutoRunLisp 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 3 of 10

Moshe-A
Mentor
Mentor

@lisaj98052 ,

 

At the end of the lisp file remove the two ;; characters in front of (vl-load-com) than see if this works?!

 

Moshe

 

 

;;------------------------------------------------------------;;

;(princ
; (strcat
; "\n::: UpdateTitleblocks.lsp | Version " UTBVersionNumber# " | © 2012 Craig Dobyns & Jef Blake :::"
; "\n::: Type \"UpdateTitleblocks\" or \"UTB\" to Invoke :::\n"
; )
😉
(vl-load-com)
;;(c:UpdateTitleblocks) ;; Remove this line to disable Autorun
(princ)
(C:UpdateTitleblocks)

;;------------------------------------------------------------;;
;; End of File ;;
;;------------------------------------------------------------;;

0 Likes
Message 4 of 10

JTBWorld
Advisor
Advisor

ActiveX code is not supported to run in the Core Console. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 5 of 10

lisaj98052
Enthusiast
Enthusiast
yes I tried that still did not run maybe I should send you a test autocad file. It runs fine in an open cad file. just not in the core environment. I don’t under stand why when a file is open it works just fine or if I run scriptpro and call the same script it runs, its just slower as is opens each file. will I guess I just keep trying sooner or later I might figure it out. Thanks for your help.
0 Likes
Message 6 of 10

JTBWorld
Advisor
Advisor

Some of the code functions used are not supported to run in the Core Console. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 7 of 10

JTBWorld
Advisor
Advisor

You can run accoreconsole.exe and try run it directly there and you see what is not working.

Example:

Command: (vlax-get-acad-object)
; error: no function definition: VLAX-GET-ACAD-OBJECT


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 8 of 10

martti.halminen
Collaborator
Collaborator

To expand on the previous answers, a little background: AutoCAD Core Console was created when building the AutoCAD for Apple Mac. In that work AutoCAD was split to the machine dependent part, including all the user interface stuff, graphics etc, and the machine-independent part, which is the same for Mac and Windows. The latter is AutoCAD Core Console.

 

So ACC doesn't contain anything Windows -specific, which means ActiveX isn't included.

 

So, no need to experiment, no function starting with vlax- or vla- will work. You'll need to re-write all the parts containing those if you wish to use that program on ACC, using the older-style operations like ENTMAKE.

Message 9 of 10

lisaj98052
Enthusiast
Enthusiast
Thank you very much for that explanation, it gives me a better
understanding.
Maybe I will have to look into how I can rewrite it. I slope as a developer
it's hasr to write code that will run on or in all platforms.

Thanks. Lisa


0 Likes
Message 10 of 10

JTBWorld
Advisor
Advisor

If you need help to rewrite the code feel free to contact me.


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes