Ooops,
 
I jsut anotice a couple of errors in the previous snippet.  Here is the fixed version
 
// Get the scope of the current map and ouptut coordinates to a text file
sMyFile = "C:\\temp\\scopecorners.txt"
f = OPenFile(sMyFile , "w")
my_scope = GetMapScope()
aCorners = GetScopeCorners(my_scope )
 
for i = 1 to aCorners.length do
     sCoordinate = r2s(aCorners[i].lon) + ", " +  r2s(aCorners[i].lon)
     WriteLine(f, sCoordinate)
end
CloseFile(f)

 
 
Cheers again
 
Armando

-------- Original Message --------
Subject: RE: [Maptitude] map window limits
From: [EMAIL PROTECTED]
Date: Wed, March 02, 2005 9:17 pm
To: [email protected]

Victor,
 
 The follwoing snippet may help you:
 
// Get the scope of the current map and ouptut coordinates to a text file
sMyFile = "C:\\MyFolder\\scopecorners.txt"
f = OPenFile(sMyFle, "w")
my_scope = GetMapScope()
aCorners = GetScopeCorners(my_scope )
 
for i = 1 to aCorners.length do
     sCoordinate = aCorners[i].lon + ", " +  aCorners[i].lon
     WriteLine(f, sCoordinate)
end
CloseFile(f)
 
 
I have not tested the snippet, but I hope it gives you and idea of what you need to do.
 
 
Cheers
 
Armando


-------- Original Message --------
Subject: Re: [Maptitude] map window limits
From: [EMAIL PROTECTED]
Date: Wed, March 02, 2005 8:03 pm
To: [email protected]

Thanks Peter,

The Constants topic helped clarify three of my issues (#1, #2 and #3).

Regarding my other issues, it appears to me that you're side stepping my
question. I apologize if I'm giving the impression that I'm asking for
someone to spoon feed me the code, because that's not the case. I'm making
an honest attempt to figure out how to use Maptitude scripting language, I
even managed to write a macro that initially did what I wanted, which is to
display the map window limits.

Now I'm looking to advance my little macro to output these values to an
ASCII text file, but getting a direct answer is like pulling teeth.

WriteArray() is used to save an array as strings in a text file that can be
read by ReadArray() and SaveArray() saves an array to a file in binary form

I understood  the difference between WriteArray() and SaveArray(), I read
the samething in the online documents. How does this help me get any closer
to a solution to my problem? Other than telling me that maybe WriteArray()
and SaveArray() aren't the commands I'm looking for; if these aren't the
commands I should be using than what ones should I be using.  I combined
them because using them independently didn't get me the result I was
looking for; so I was experimenting a little bit.

Apparently I wasn't clear on my problem.  I'm looking for the command that
will allow me to output my "Scope" coordinates to a usable ASCII compatible
text file that I can read outside of Maptitude; say in notepad or a similar
MicroSoft text editor. Can this be done? And if so, is the macro as it is
currently structured, lend itself to be modified relatively easly to do
this or should I scrap it an try a different approach?

I apologize for my abbrasive tone but I'm just extremely frustated because
I know I'm missing or overlooking something increadably obvious.

Regards,
Viktor Keenan de la Hoz - Senior GIS Technician
City of Phoenix - Street Transportation Department
Design and Construction Management Division



                                                                                                                                             
                     "Peter H. Van                                                                                                          
                     Demark"                  To:      [email protected]                                                            
                     <[EMAIL PROTECTED]         cc:                                                                                            
                     om>                      Subject: Re: [Maptitude] map window limits                                                    
                                                                                                                                             
                     03/02/2005 12:46                                                                                                        
                     PM                                                                                                                      
                     Please respond                                                                                                          
                     to Maptitude                                                                                                            
                                                                                                                                             
                                                                                                                                             





Viktor:

>Okay now I'm playing around with the WriteArray() and SaveArray() commands

>and I can't seem to get Maptitude to write my coordinates to a file.

A few notes:

- WriteArray() to save an array as strings in a text file that can be read
by ReadArray(), while SaveArray() saves an array to a file in a binary
form. You are calling both, so SaveArray() overwrites the file written to
by WriteArray().

- You must precede backslashes characters in string constants with the
backslash character, because a backslash is used to indicate special
characters, such as a tab (\t) or a newline (\n); see the Constants topic
in the GISDK on-line help.


Peter

----------------------------------------------------------------
Peter Van Demark
Director of GIS Products and Training        Phone: 617-527-4700
Caliper Corporation                            Fax: 617-527-5113
1172 Beacon Street                     E-mail: [EMAIL PROTECTED]
Newton MA 02461-9926            Web site: http://www.caliper.com






Yahoo! Groups Links














------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EA3HyD/3MnJAA/79vVAA/C5grlB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/Maptitude/

<*> To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/

Yahoo! Groups Sponsor
ADVERTISEMENT
click here

Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to