AutoCAD for Mac Forum
Welcome to Autodesk’s AutoCAD for Mac Forums. Share your knowledge, ask questions, and explore popular AutoCAD for Mac topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Terminal command line startup w/ -b (Mac) does not work, script does not run.

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
achim_geissler
321 Views, 6 Replies

Terminal command line startup w/ -b (Mac) does not work, script does not run.

Hi all, I am trying to call Autocad 2023 (on a Mac) via a terminal command line and pass a script w/ -b. Autocad is fired up fine, the file is loaded, however, the script is not run.

The script should (as first steps) turn off some layers and should then change the viewpoint, so begins with

 

; Turn layer 1 off.

-LA OFF 1

 

; Turn all layers beginning with "Building*" (shading) off.

-LA OFF Building*

 

; Set view to something reasonable.

DV DVIEW ALL TA -45 -45

 

I tried various variants w/ w/o "-", all to no avail. In the ACAD command line window, the following appears:

 

Opening a Release 12 DXF file.
Regenerating model.
AutoCAD menu utilities loaded.*Cancel*
Command:
Command:
Command:
Command:
Command:
Command:

 

Thanks for any ideas and/or tips. An extensiv web-search always leads to the ACAD pages describing the command line switches ...

 

Best

Achim

Tags (1)
6 REPLIES 6
Message 2 of 7
maxim_k
in reply to: achim_geissler

Hi @achim_geissler ,

 

I checked just now and -b switch works for loading custom script at startup.

 

How your terminal command looks like?

Have you provided full pay to the script file you want to execute at AutoCAD startup?

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 3 of 7
achim_geissler
in reply to: maxim_k

@maxim_k , my command line looks like this (yes, w/ full paths, except for the .dxf file, however, this loads correctly):

 

% /Applications/Autodesk/AutoCAD\ 2023/AutoCAD\ 2023.app/Contents/MacOS/AutoCAD  ../EPlus/AUE_BS_BAS0_6_CTF_test/AUE_BS_BAS0_6_CTF_testout.dxf -b /Users/achim/ProjectsGit/aue_digitwin/Tools/set_view.scr

 

I am on MacOS 12.6.2, Intel silicon, SHELL=/bin/zsh. The script file is raw text according to TextEdit.

So for you it works? Hm. Any ideas?

 

Message 4 of 7
maxim_k
in reply to: achim_geissler

Hi @achim_geissler ,

 

It should work. At least it works on my side with my files - I tried DXF and SCR.

Can you share your DXF and SCR files here? I can look at them.

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 5 of 7
achim_geissler
in reply to: maxim_k

Hi @maxim_k, thanks for taking time to look at this. Attached my files. I'm really curious as to what I am doing wrong.

Best

Achim

P.S.: While trying to upload the .dxf, I got an error message (see screenshot), so compressed the file. Possibly a source of error even though ACAD loads the model w/o problem?

Message 6 of 7
maxim_k
in reply to: achim_geissler

Hi Achim,

 

>>>>Possibly a source of error even though ACAD loads the model w/o problem?

No, it is Forum related alert.

 

The problem is in the script file you are trying to use.

You cannot use command aliases in the script file, so you cannot use "-LA" for "-LAYER" command, you need to put the full command name. There were also some additional unnecessary blank lines (Returns in script file).

I edited your script file and now it seems to work correctly - at least I have PDF from your drawing after executing script, which I load with Terminal command. I attached edited SCR file for your reference.

 

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 7 of 7

Thanks! So simple (if one knows how, as usual 😐). It works for me now, also.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report