0

Hello,
The file name I want to use is always different, though the directory path name is the same. How can I get the variable to see the same directory path without throwing in the extra quotes? For example, I enter DE000000 for the drawing number.
ScriptFileName = Drawing_Number & ".scr"
When I have this format for the path and file name:
ScriptPathandFile = """S:\DsnTools\Drawing Search Tool\UNIT ARRAY\"" " & ScriptFileName
I get this:
ScriptPathandFile now equals ""S:\DsnTools\Drawing Search Tool\UNIT ARRAY\" DE000000.scr"
Notice the space and quote just before the scr file name.

When I use this format:
ScriptPathandFile = """S:\DsnTools\Drawing Search Tool\UNIT ARRAY\" & ScriptFileName & ""

I get:
ScriptPathandFile now equals ""S:\DsnTools\Drawing Search Tool\UNIT ARRAY\DE000000.scr"

In both cases I get an extra quote at the beginning.

Thanks in advance for your help.
Mark

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by SCBWV
0

Ok, never mind. I got it worked out.
PathName = "S:\DsnTools\Drawing Search Tool\UNIT ARRAY\"
AcadPath = """C:\Program Files\AutoCAD 2008\acad.exe"""
ScriptFileName = Drawing_Number & ".scr"

ScriptPathandFile = PathName & ScriptFileName


LaunchAcadWithScript = AcadPath & " /b """ & ScriptPathandFile & """"
Shell LaunchAcadWithScript

Don't know if that's the best way, but it worked for me.

Mark

0

Why are you using extra quotes?

ScriptPathandFile = "S:\DsnTools\Drawing Search Tool\UNIT ARRAY\" & ScriptFileName

should do just fine

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.