+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 31
  1. #1
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2010
    Posts
    11

    Default script problem: blank space in file path

    Registered forum members do not see this ad.

    Hi to everyone,

    this is my first post on the forum and I want to thanks to all of you will have patience to read my post.

    I have a problem with the blank space in some filepaths of my script.
    something like

    C:\Documents and settings\test.txt

    in a script line. AutoCAD consider the first blank space like an enter and of course it doesn't know the 'AND' command.
    and my script doesn't work.

    I know the most easy answer would be 'change your path in a different one without blank spaces!' but unfortunately I can't.

    I don't know how to solve this problem. I heard AutoLISP is a stronger tool to use for that scope but I don't know anything about LISP. So I'll appreciate all of your tips and your help.
    Thanks.

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,319

    Default

    You will find your answer here

    http://lee-mac.com/scriptwriting.html

    Welcome to CADTutor
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2010
    Posts
    11

    Default

    Thank you very much Lee Mac!
    I didn't think it could be so easy and thanks for your quick answer!

  4. #4
    Super Member
    Computer Details
    designerstuart's Computer Details
    Operating System:
    xp
    Computer:
    various
    Discipline
    Architectural
    designerstuart's Discipline Details
    Occupation
    architect
    Discipline
    Architectural
    Using
    ADT 2009
    Join Date
    Jun 2010
    Location
    near london, near europe
    Posts
    867

    Default

    for those without access to the link: just use "quotes"

    "C:\Documents and settings\test.txt"
    instead of
    C:\Documents and settings\test.txt

  5. #5
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,319

    Default

    Quote Originally Posted by lacciap View Post
    Thank you very much Lee Mac!
    I didn't think it could be so easy and thanks for your quick answer!
    You're welcome, I thought it would give a more complete answer, and maybe answer any other questions you might have
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  6. #6
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2010
    Posts
    11

    Default

    thanks designerstuart and thanks for your help guys!
    I like this forum and I hope to be useful to someone in the future.

    Maybe when I'll a little bit more skilled!

  7. #7
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,199

    Default

    *cough* ScriptPro or AutoScript *cough*
    DropBox
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  8. #8
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2010
    Posts
    11

    Default

    Hi everyone,

    maybe I should open a new thread but since this is the second step of my project after running script files in AutoCAD I write here.

    I'd like to create a batch application (I use C#) that launch AutoCAD, minimize the AutoCAD window and execute the script file. I found ScriptPro (thanks alanjt!) with its source code and I saw it uses reflection to open and manage AutoCAD, but I don't find the way to minimize AutoCAD window in its code.
    Did anybody of you make something similar in your experiences, maybe without reflection?
    Thanks again.

  9. #9
    Super Member fixo's Avatar
    Computer Details
    fixo's Computer Details
    Operating System:
    Windows 7
    Motherboard:
    E7500
    CPU:
    Intel(R)Core(TM)2 DUO CPU 2.93HGz
    RAM:
    4098 Gb
    Graphics:
    1024 Gb
    Using
    AutoCAD 2009
    Join Date
    Jul 2005
    Location
    Thanks God, I'm far enough from Hitleropa
    Posts
    1,697

    Default

    Quote Originally Posted by lacciap View Post
    Hi everyone,

    maybe I should open a new thread but since this is the second step of my project after running script files in AutoCAD I write here.

    I'd like to create a batch application (I use C#) that launch AutoCAD, minimize the AutoCAD window and execute the script file. I found ScriptPro (thanks alanjt!) with its source code and I saw it uses reflection to open and manage AutoCAD, but I don't find the way to minimize AutoCAD window in its code.
    Did anybody of you make something similar in your experiences, maybe without reflection?
    Thanks again.
    You might want to look at this page:
    https://sites.google.com/site/bushma...ratory/lab/pof
    (but the explantion is on Russian only - use web translator)
    The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)

  10. #10
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2010
    Posts
    11

    Default

    Registered forum members do not see this ad.

    Thanks for your post fixo.
    I'll take a look for sure to that page.

Similar Threads

  1. Partial Blank Space (Dead Area?)
    By gohanrice in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 11
    Last Post: 25th Jul 2009, 01:00 am
  2. PublishToWebJPG produces a blank image file
    By repowers in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 23rd Sep 2008, 05:40 pm
  3. Script File
    By vinod in forum AutoCAD Drawing Management & Output
    Replies: 7
    Last Post: 25th Oct 2007, 06:51 pm
  4. Finding file path of specified support file
    By Autodesk in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 9th Nov 2006, 01:40 am
  5. script file
    By kevinw in forum AutoCAD General
    Replies: 8
    Last Post: 25th Jan 2005, 06:48 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts