Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.SCR to Import and Restore Layer State

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1078 Views, 3 Replies

.SCR to Import and Restore Layer State

Hi,

 

I am trying to write a script to import and restore a .las file.

 

-Layer
A
I
C:\Users\Me\Example\Example.las
R
Example.las
(Space/Enter)
(Space/Enter)
(Space/Enter)
(Space/Enter)

 This works when I do it manually, but when running the script it gets an error after executing "I".

It defaults to the file path of the file I'm trying to run the script on rather than the file path in the script. There is not an extra space after "I".

 

Does anyone have an idea of what I'm doing wrong? Also, I am using AutoCAD LT, so I can't switch to a LISP solution.

 

Thanks

Ryan

Tags (1)
3 REPLIES 3
Message 2 of 4
Kent1Cooper
in reply to: Anonymous

I don't use Scripts much, but as a guess:

 

Help doesn't say anything about it, but could this be as in AutoLisp, that filepath separators need to be either double  backslashes or single forward  slashes?  That's needed in AutoLisp because a single backslash is a marker for a following control character, but I'm not sure about Scripts.

Kent Cooper, AIA
Message 3 of 4
Anonymous
in reply to: Anonymous

There was a space in the name of a folder in the file path.

Enclosing the entire filepath in quotes solved the issue.

 

Ryan

Message 4 of 4
Anonymous
in reply to: Kent1Cooper

It was because the real filepath I was using had a space in one of the folder names. I closed that entire line in quotes, solving my issue. Thanks for replying though!

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

Post to forums  

Forma Design Contest


AutoCAD Beta