Need help writing a script
Terry333
Global Mapper UserTrusted User
I have tried to write a script using the GENERATE_REPORT command to read a PGDB, 800+MB and 750M+ records, that I have loaded into GM 11 and write a csv file. All I get is errors.
What I would like for the csv to contain would be the field name, in this case LINE_ID, and the value of that field, i.e. 100, but no matter how many records have a LINE_ID of 100 I only want it to show up once in my csv.
So the csv would look like:
LINE_ID,100
LINE_ID,124
.
.
.
LINE_ID,945
Is this possible to do with GM scripting or is there a better way?
Thanks,
Terry
What I would like for the csv to contain would be the field name, in this case LINE_ID, and the value of that field, i.e. 100, but no matter how many records have a LINE_ID of 100 I only want it to show up once in my csv.
So the csv would look like:
LINE_ID,100
LINE_ID,124
.
.
.
LINE_ID,945
Is this possible to do with GM scripting or is there a better way?
Thanks,
Terry
Comments
-
Terry,
What does your script command look like? I would try something like the following to get what you are after:
GENERATE_REPORT OUTPUT_FILENAME="c:\my_output_path\my_report.csv" REPORT_ATTR="LINE_ID"
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
My script had the same commands and parameter/value paris as yours except I put each one on a separate line. Once I made the changes it ran fine.
I read through the scripting language reference again and though it is not specifically stated that the command and parameter/value pairs should be on the same line, no LF/CR after the command and after each parameter/value pair, reading the reference and looking at your example it does seem that it is implied. Will have to remember that.
Thanks for your help. Great support as always.
Terry
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website