Loading ...
Sorry, an error occurred while loading the content.

clip to format a file in particular manner

Expand Messages
  • Matt Fridell
    I’m in above my head here and am not getting anywhere. I need to create files from information that looks like this: D-IR-HOSEBIB D-IRRIG-HOSEBIB And turn it
    Message 1 of 5 , Nov 15, 2002
    • 0 Attachment
      I’m in above my head here and am not getting anywhere.


      I need to create files from information that looks like this:

      D-IR-HOSEBIB
      D-IRRIG-HOSEBIB

      And turn it into this:

      D-IR-HOSEBIB,C:\PROJECTS\LANDESIGN GROUP\CONCORD\DETAILS&LEGENDS\IRRIGATION
      DETAILS\D-IRRIG-HOSEBIB.DWG
      D-IRRIG-HOSEBIB,C:\PROJECTS\LANDESIGN
      GROUP\CONCORD\DETAILS&LEGENDS\IRRIGATION DETAILS\D-IRRIG-HOSEBIB.DWG

      Where I select the file path.

      So far I’m just about as lost as I can be. I’m way over my head using
      variables and functions. I can wade through basic document creation, but if
      anybody has the time to kind of walk me through this, I’d really, really
      appreciate it. It’d end up saving me much headache and heartache in my day
      to day work. . . .Thanks. .

      Matt
      -----------------------------
      Matt Fridell
      Landesign Group

      Matt Works in South Dakota:
      25130 Little Italy Road
      Custer, SD 57730
      Elevation Lat. Long.
      5318 feet 43.767ºN 103.598ºW
      (605) 673 - 5376
      Web-based fax: (413)638-2979 (preferred use)
      Standard fax: (605) 673 - 5376
      saladays@...



      [Non-text portions of this message have been removed]
    • Matt Fridell
      So I m closer, but still having problems. My InsertCode and InsertText don t seem to insert in order. Things don t go where they should. And I don t know how
      Message 2 of 5 , Nov 15, 2002
      • 0 Attachment
        So I'm closer, but still having problems. My InsertCode and InsertText
        don't seem to insert in order. Things don't go where they should. And I
        don't know how to get it to do all the lines in the document. Actually, one
        line at a time would be fine, but not sure what else to try. . . .

        Like I said, I'm a knuckle head when it comes to using variables and
        whatnot. Thanks for any input. . .

        Matt


        ^!FocusDoc
        ;GET PATH
        ^?[(T=D)&File Location=c:\Projects\Landesign Group\]
        ^!Set %location%=^$GetSelection$
        ;Start by selecting the current line (or word-wrapped line)
        ^!Select Line
        ;End the procedure if the line is empty
        ^!If ^$GetSelSize$ = 0 End
        ;Copy the selection into a variable
        ^!Set %ParaText%=^$GetSelection$
        ^!SetPasteIndent Off
        ;Insert copied line back into document
        ^!InsertCode ^%ParaText%
        ^!InsertText ,
        ^!InsertCode ^%location%
        ^!InsertText .dwg
        ;REPEAT UNTIL NO LINE
      • Sheri
        ... Hi Matt, I think you are confused about the purpose of ^!InsertCode. It s purpose is to allow tokens that ordinarily represent tabs ^T and line breaks ^P
        Message 3 of 5 , Nov 15, 2002
        • 0 Attachment
          --- In ntb-clips@y..., "Matt Fridell" <saladays@g...> wrote:
          > So I'm closer, but still having problems. My InsertCode
          > and InsertText don't seem to insert in order. Things
          > don't go where they should. And I don't know how to get it
          > to do all the lines in the document. Actually, one line
          > at a time would be fine, but not sure what else to try. .
          > . .
          >
          > Like I said, I'm a knuckle head when it comes to using
          > variables and whatnot. Thanks for any input. . .
          >
          > Matt

          Hi Matt,

          I think you are confused about the purpose of
          ^!InsertCode. It's purpose is to allow tokens that
          ordinarily represent tabs ^T and line breaks ^P to be
          inserted as text. There are no tokens in your text. There
          are real line breaks not representative tokens.

          For your purposes ^!InsertText is fine.

          ^!Select Line is also not what you want, because it picks up
          the line break.

          ^!Select EOL is better for your purposes, but to work
          properly, word-wrap needs to be turned off.

          If you want to be prompted on each line, you should use
          curly braces instead of square brackets on your file wizard.
          That way it won't try to prompt until it gets to that instruction,
          which will happen once for every line (until a blank line or
          no more lines). (If you don't want to be prompted for each line
          move the wizard up to the top, out of the look, and remove
          ^$GetSelection$ from its prompt in the following clip.)

          You need to assign your wizard to a variable, otherwise it
          gets written into the document before you want it. You
          could avoid a variable by embedding it in the ^!InsertText
          although that would make a pretty long line.

          Try it this way (you're learning!)

          Regards,
          Sheri

          ^!SetWordWrap Off
          ^!Jump Line_Start
          ^!SetPasteIndent Off
          ;GET PATH
          :Loop
          ;Start by selecting the current un-wrapped line
          ^!Select EOL
          ;^!Set %location%=^$GetSelection$
          ;End the procedure if the line is empty
          ^!If ^$GetSelSize$ = 0 Out
          ;Copy the selection into a variable
          ;unwrap the following line
          ^!Set %loc%=^?{(T=D)^$GetSelection$ File
          Location=c:\Projects\Landesign Group\}
          ;Insert copied line back into document
          ^!InsertText ^$GetSelection$,^%loc%^$GetSelection$.dwg
          ;REPEAT UNTIL NO LINE
          ^!If ^$GetRow$=$GetLineCount$ Out
          ;goto next line
          ^!Jump +1
          ^!Goto Loop
          :Out
        • hugo_paulissen
          Hi Matt, As you may have found out, there are numerous ways to do what you want. It depends on the exact files that you want to process, and how the output
          Message 4 of 5 , Nov 15, 2002
          • 0 Attachment
            Hi Matt,

            As you may have found out, there are numerous ways to do what you
            want. It depends on the exact files that you want to process, and how
            the output really should be, so I'm giving you some suggestions for
            incorpration in your own clip. You know best what you want to do with
            it...

            You should create the variable right away, like this...
            ^!Set %location%=^?{(T=D)&File Location=c:\Projects\Landesign Group\}

            I'd change ^!Select LINE to two lines (1.^!Jump Line_Start and 2.^!
            Select EOL), because this will not select a linebreak.

            And in the end, if you insert something like this...
            ^!InsertText ^%ParaText%,^%location%^%ParaText%.dwg^%NL%

            Note that ^%NL% will insert a linebreak after the extension.

            Repeats can be done if you make a loop in your clip. The easiest
            would be to create labels (lines start with :) and direct the clip to
            a specific label at certain instances. (More info: Clip Script
            Help:Labels and Library SampleCode:LOOPS).

            Good Luck,

            Hugo


            ^!FocusDoc
            ;GET PATH
            ^!Set %location%=^?{(T=D)&File Location=c:\Projects\Landesign Group\}
            ;Start by selecting the current line (or word-wrapped line)
            ^!Jump LINE_START
            ^!Select EOL
            ;End the procedure if the line is empty
            ^!If ^$GetSelSize$ = 0 End
            ;Copy the selection into a variable
            ^!Set %ParaText%=^$GetSelection$
            ^!SetPasteIndent Off
            ;Insert copied line back into document
            ^!InsertText ^%ParaText%,^%location%^%ParaText%.dwg^%NL%
            ;REPEAT UNTIL NO LINE
          • Matt Fridell
            Thank you both - Sheri and Hugo. Both have given me insight into how this works. It seems that for me seeing an example tells me so much more than sorting
            Message 5 of 5 , Nov 15, 2002
            • 0 Attachment
              Thank you both - Sheri and Hugo. Both have given me insight into how this
              works. It seems that for me seeing an example tells me so much more than
              sorting through the help files. I feel like a fool who discovered a
              dictionary and every word I look up leads to more and more words to look up
              until I loose what I was searching for in the first place.
              After a little fooling around I have three variations that do great for what
              I need to work and about 20 ideas for other things to do. Man. And about
              100 questions.
              Thanks again. Matt
            Your message has been successfully submitted and would be delivered to recipients shortly.