Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Bminer

    Parsing a dxf file to extract coordinate data from obscure entities

    Mikrom, That is the ticket! Thanks for your help. It is doing exactly what I need. No I can get on with breaking up these pesky entities and eliminate all the extra work I was doing. Brian
  2. Bminer

    Parsing a dxf file to extract coordinate data from obscure entities

    Finally getting back to this and tried another stab using Mikrom's code. set fi [open data_files\\strings_dtms\\topos\\1998\\polymesh.dxf "r"] set fo [open tempwrite.str "w"] set a "VERTEX" #target entity to search for set out_line {} while {! [eof $fi]} { # read line from file set...
  3. Bminer

    Parsing a dxf file to extract coordinate data from obscure entities

    Ah, I think I know the disconnect. In the file I am parsing, it contains sometimes several thousand lines. Each group of lines (as few as 4 and as many at 30+) are identified by a entity type. As mentioned, I am only interested in the entity type "VERTEX" which when found contains 21...
  4. Bminer

    Parsing a dxf file to extract coordinate data from obscure entities

    Thanks for the suggestion mikrom, I plugged your code in and appear to be getting an endless loop (ran 5 minutes) After killing the run, the temp file had nothing in it. Not sure what it occuring. Brian
  5. Bminer

    Parsing a dxf file to extract coordinate data from obscure entities

    Greetings, I work with topographical cad files which normally contain well behaved polyline entities (2d, 2d with elevation and 3d linework). Most of the tools I have deal with these various entities. However, I often run across older cad files that contain polymesh entities. These rascals...
  6. Bminer

    Adding test to the first line in a large text file.

    thacoda, I suspect that your solution would have solved my issue. I ran the routine with and without quotes. Adding the quotes gave me the final error of "the system cannot find the specified path". Without the quotes I got a "does not recognize this command" or somesuch error. The last...
  7. Bminer

    Adding test to the first line in a large text file.

    I tried code and while it attempted to run, the error message states Perhaps the program's path and the path expected by cmd.exe are different? Brian
  8. Bminer

    Adding test to the first line in a large text file.

    reading http://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm#M24 there are notes about windows systems I might not have a console attached to the application which apparently prevents exec from functioning. TCL is functioning within a 3rd party program. Brian
  9. Bminer

    Adding test to the first line in a large text file.

    Removed the [] and got Warning: Tcl generated error at line 13: couldn't execute "copy": no such file or directory while executing "exec copy data_files/geological_database/stratalines/dtms/prefix.txt+data_files/geological_database/stratalines/dtms/ovb_grid.dtm...
  10. Bminer

    Adding test to the first line in a large text file.

    feherke, I am trying your approach. I generated a permenant prefix file using the put noneline command. This file will never change. The other files will routinely be regenerated as new information is added thus requiring the path name being added back into the regenerated file. However I...
  11. Bminer

    Adding test to the first line in a large text file.

    Figured it out! Here is my code # code to add missing path in .dtm file set fi [open data_files\\geological_database\\stratalines\\dtms\\l1_grid.dtm r] set fo [open data_files\\geological_database\\stratalines\\dtms\\l1_grid_temp.dtm a] append line...
  12. Bminer

    Adding test to the first line in a large text file.

    I am trying to add a path to the .str file referenced in the header line of the text file. I use concat all the time in excel so that experience led me down that path. Do I need APPEND instead? I am trying it now but cannot seem to get it to work (yet). Brian
  13. Bminer

    Adding test to the first line in a large text file.

    Thanks for the reply feherke, After pondering over this, for now, I can stand parsing the old file to a new file and "Concat"ing the new text in. Here the first two lines from the initial file L1_grid.str,6251187200;algorithm=standard;fields=x,y 1, 672673.000, 1278320.000, 465.414, Here is...
  14. Bminer

    Adding test to the first line in a large text file.

    thacoda, Thanks for the reply. Two points on using sed. First, the programs I am using are on a Windows 7 machine. It could be loaded it onto this machine and then follow your suggestion. I am researching this option (little prior experience with Unix/ Sed before). The downside of this...
  15. Bminer

    Adding test to the first line in a large text file.

    Title should read "Adding TEXT to the first line of a large text file" Brian
  16. Bminer

    Adding test to the first line in a large text file.

    Howdy, I am a new user of TCL macros with a software package used in house. The software creates a text file. The first line of the file is supposed to contain both the path and name of a partner file. Due to a bug is the software, the path is not being added to this first line of the test...

Part and Inventory Search

Back
Top