Script file stops at fileopen prompt

Script file stops at fileopen prompt

peter_thomson
Advocate Advocate
411 Views
7 Replies
Message 1 of 8

Script file stops at fileopen prompt

peter_thomson
Advocate
Advocate

A colleague wants to write and run script files to manipulate drawings.

He has run into an issue using the _open command in his scripts...

The following is an example..

_open
"C:\data\site layout.dwg"

...

 

The drawing "site layout" exists in the folder as above.

I can run the script on my machine and it runs fine.

From what I can tell, our system variables are the same...unless there is something I have missed..

His stops at the fileopen prompt on the command line.

 

Wondering if anyone is able to shed any light on why this should be?

 

Best wishes,

Peter T

0 Likes
412 Views
7 Replies
Replies (7)
Message 2 of 8

cadffm
Consultant
Consultant

>>"His stops at the fileopen prompt on the command line."

What AutoDESK Product, what Productverion? Command: ABOUT

With what a message? Share the last 10 lines of his Textwindow [F2]

 

It sounds like you tested another scriptfile or he's running SDI mode and the current file has unsaved changes.

Sebastian

0 Likes
Message 3 of 8

peter_thomson
Advocate
Advocate
Hi there,
C3D 2022.
He was having this issue on C3D 2021.3 as well.
SDI mode is not active.
The test script and the file it opens are identical on his machine and mine. Mine works, his doesn't.
We have investigated STARTMODE and STARTUP settings and these are also identical on both our machines.
STARTMODE 0 STARTUP 3
I am pretty sure that there is a setting hidden somewhere that is causing this.
Cheers, Peter
0 Likes
Message 4 of 8

cadffm
Consultant
Consultant

Hi,

 

you talk about STARTMODE and STARTUP, so you are talking about to START C3D program with parameter /b ?

If so,

what happen instead? Share the textlog: [F2]

 

And try this: Open C3D with one file open, load *.scr by command SCRIPT.

Opend the file? and worked the rest of your script? Share the textlog: [F2]

 

Sebastian

0 Likes
Message 5 of 8

peter_thomson
Advocate
Advocate

Hi again,

 

No, we are not using the /b switch.

 

This is simply dragging a script file onto the drawing editor screen.

So, any script file that includes the "open" command stops at that command even when a valid full filepath and filename is included in the script. My previous explanation was to show that identical files and locations on both his and my machines give different results. Mine works, his doesn't.

Running the script by issuing the SCRIPT command makes no difference, The script stops at the open prompt awaiting a valid filename. The filename supplied IS valid.

cheers..

0 Likes
Message 6 of 8

Sea-Haven
Mentor
Mentor

It may be that the OPEN has been undefined via a lisp. You can restore an undefined command with REDEFINE. Do that then run script. If ok then need to find the lisp.

 

0 Likes
Message 7 of 8

peter_thomson
Advocate
Advocate

Thanks for your response, but, no, our OPEN command ha not been redefined.

cheers, Peter

0 Likes
Message 8 of 8

Sea-Haven
Mentor
Mentor

The other to try is maybe "C:\\data\\site layout.dwg"

0 Likes