How to call a .lsp file from a Script (.scr) from CoreConsole

How to call a .lsp file from a Script (.scr) from CoreConsole

Anonymous
Not applicable
1,121 Views
3 Replies
Message 1 of 4

How to call a .lsp file from a Script (.scr) from CoreConsole

Anonymous
Not applicable

I have this ATTOUT routine in AutoLisp that I'm trying to run it by calling a script from Core Console 2016...

 

I tried loading it from a .scr file like this :

 

(load "C:\\Program Files\\Autodesk\\AutoCAD 2016\\attout.lsp")

but the console just re-printed this line in the terminal and quits....

 

 

 

 

Am I doing something wrong?? I 'm trying to automise the ATTOUT operation in a Java application..

 

PS : i've attached my attout.lsp file..

0 Likes
1,122 Views
3 Replies
Replies (3)
Message 2 of 4

dbroad
Mentor
Mentor

I haven't used the core console much but loading the program does not run the program.  If the core console supports commands that prompt, then you need to provide all the prompts.  The core console does not support dialog boxes and I believe that the attout command has a file dialog.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 4

stevor
Collaborator
Collaborator

1. It seems like it only loads the new command 'c:attout,'

which you can call from the command line by 'ATTOUT.'

You can modify that file by adding the execution statement at the end,

like (C:attout) so that the routine starts when you load it..

 

2. It also requires the 'acet-' subroutines.

S
0 Likes
Message 4 of 4

hmsilva
Mentor
Mentor

@Anonymous wrote:

I have this ATTOUT routine in AutoLisp that I'm trying to run it by calling a script from Core Console 2016...

 

I tried loading it from a .scr file like this :

 

(load "C:\\Program Files\\Autodesk\\AutoCAD 2016\\attout.lsp")

but the console just re-printed this line in the terminal and quits....

Am I doing something wrong?? I 'm trying to automise the ATTOUT operation in a Java application..


Something like this should work...

(untested)

(if (setq ss (ssget "_X" (list (cons 0 "INSERT") (cons 8 "theblocklayer") (cons 2 "theblockname"))))
   (progn
      (setq filename "c:\\the\\full\path\\filename.txt")
      (load "attout")
      (bns_attout filename ss)
   )
)

 

Hope this helps,
Henrique

EESignature

0 Likes