Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Opening files

  1. #11
    Join Date
    Feb 2004
    Location
    , Cheltenham
    Posts
    415

    Default

    I quote (cut&paste) from my current programming handbook:
    INPUT #(openfilenumber) &variablename { ,&variablename, &variablename,
    etc }

    Comma?
    Ok, so it is in the file you mention, BUT they still send out the 03 programming handbook which is HOPELESSLY out of date with the current PRT program

    PLEASE can somebody pull it all together.
    I NEED a correct full reference. It is costing me HOURS.
    Rant over. (hair falling as I speak)

    I'll see if it does the trick next time shopbot stops.

  2. #12
    Join Date
    Jul 2004
    Location
    Valcourt, Québec, Canada
    Posts
    1,887

    Default

    Aren't you looking at WRITING in the file instead of reading in a value?

    Check out 'C:\Program Files\ShopBot\Developer Tools\Docs\SbW_ShopBotProgrammingStatements.txt&#3 9;

    ---------------------------------------------------------------------------------------------------------
    INPUT, INPUT #
    Works like it has, except that INPUT calls up a message box for user input that provides OK/Cancel Buttons. Cancel removes the box and ends the program. OK enters the values in the box. If the box is empty and only one variable is expected, it treats variable as empty string and continues. If more than one variable is expected, an empty box is the same as a cancel. INPUT #_ reads in variables from a file as strings or numbers.

    INPUT "Optional Text Message" &variable1, &nextvariable, &and_so_on
    INPUT #{number}, &variable1, &nextvariable, &and_so_on
    ---------------------------------------------------------------------------------------------------------
    WRITE
    (note comma vs semicolon in the syntax below ... this is all pretty much the same as DOS version)
    Write #?, (data list, items separated by comma) ... This is the standard way to use Write function. Separate each data item by a comma and they will be evaluated and separated by commas in the output file. A semicolon as the last character will surpress the line feed in the file being printed to.

    Write #?; (data list; items separated by semicolons) ... This is an alternative Write function in which all spacing characters are surpressed except those explicitly supplied in data list. A semicolon as the last character will surpress the line feed in the file being printed to. For example, to generate: &myVar = 23.5 in the generated file you would use:

    &someVar = 23.5
    Write #1; "&myVar = "; &someVar

    Or if you wanted to generate: M2, 23.5, 23.5 you would use

    &someVar = 23.5
    Write #1; "M2, "; &someVar; ", "; &someVar

    Thus, the Write #?; version of the Statement gives the most explicit control of punctuation in the output file. Alternatively, the last statement could have been produced more simply with:

    &someVar = 23.5
    Write #1, "M2", &someVar, &someVar

    ** Currently can not have a comma inside quotes to write with Write #?, but you can accomplish this using the more explicit controls of Write #1; ...

    -------------------------------------------------------------------------------------------------------

    I find it this doc most of the latest stuff... don't hesitate to get in touch with SB support for help.

  3. #13
    Join Date
    Feb 2004
    Location
    , Cheltenham
    Posts
    415

    Default

    Paco,
    I'm looking to read from the file in this instance. Apparently you open the file with an OUTPUT flag if you want to write to it and open a file with an INPUT flag if you read from it. This is the reverse of what I am used to in autolisp.

    R.

    PS Please can we all put pressure on shopbot for a unified, up to date, CLEAR, and comprehensive programming manual.

  4. #14
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,769

    Default

    Hey Ralph,

    Dick is correct...we try to keep the most current changes to the Programming commands in that SbW_ShopBotProgrammingStatements document. As soon as we get some time we'll redo the programming manual...it's definately on the todo list...but until then that doc is the best place to look. Hopefully I'll cover some of these issues in the next couple of Bill's Corner articles as well.

    If you find changes that are not in that doc it would be a big help if you would email them to me and I'll make sure they get put in.

    Bill

  5. #15
    Join Date
    Feb 2004
    Location
    , Cheltenham
    Posts
    415

    Default

    Bill,
    It's been on the todo list for at least a Year now. (we've had this conversation before...). Could I suggest you include the document as a version ammendment *alongside* the programming handbook in both the control software and the download section of the web site.
    Does it mean, by the way, that if I write a file to the current standard, it will not work if I re-instate 3.1.14? (my last favourite)

    Thanks,

    R.

  6. #16
    Join Date
    Feb 2004
    Location
    , Cheltenham
    Posts
    415

    Default

    OK, it works now, thanks to Dicks comma..

    r.

  7. #17
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,769

    Default

    Ralph,

    All the programming commands should work the same in 3.1.14 as they do now, and except for the new commands like PLAY and some changes to the way text is handled and message boxes are displayed they should work the same way as they did in the DOS software.

    That said, 3.1.14 was pretty early in the evolution of the Windows software and my guess is that there may be some commands that may not have worked correctly back then, especially in Preview mode. If so it's not from changes to the commands but from bugs in an early version of the software.

    Bill

Similar Threads

  1. Opening a DXF
    By kubotaman in forum ShopBotter Message Board
    Replies: 11
    Last Post: 10-28-2011, 12:50 PM
  2. Opening dxf in vector
    By donj93 in forum Troubleshooting
    Replies: 4
    Last Post: 03-06-2009, 09:52 AM
  3. Preview Screen not opening
    By cjohnson in forum Archives2007
    Replies: 1
    Last Post: 03-19-2007, 10:14 PM
  4. Replies: 3
    Last Post: 01-23-2005, 02:03 PM
  5. Opening files created with probe?
    By daniel in forum Archives2004
    Replies: 3
    Last Post: 11-15-2004, 05:53 PM

Posting Permissions

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