Oops, Sorry, i reread your code and you had. Your indenting confused me.

Below is code that has worked for me, perhaps the 0 instead of the frontwindow makes the difference?


Layout gLayoutWinID = WindowInfo(0,WIN_INFO_WINDOWID) Set Window gLayoutWinID Title LayoutMapTable + "_" + gCurrFarm Set Window gLayoutWinID Min Set Window gLayoutMapWinID Min Set CoordSys Layout Units "cm" Create Frame Into Window gLayoutWinID (0.1,0.1) (gPageSize.x,gPageSize.y) From Window gLayoutMapWinID FillFrame On Pen (1,1,BLACK)



On Mon, 29 Mar 2004 17:22:44 -0600, Fast, Tim <[EMAIL PROTECTED]> wrote:

Listers,

I have a MapBasic program that creates a layout from a map. The program will processes numerous maps/layouts one after the other. After each layout is created, and saved a "Close All" is issued before the next map starts.
Every few maps, when creating a layout I get the following error:
"Mapper has no editable layer to create objects or editable layer is not visible"
The error occurs on the first Create Frame statement during the Layout's construction.


I have used WindowInfo to expressly call either the mapper or layout windows.
I have tried including the "Into Window layoutwinID" portion of the Create Frame command.


Here is the snippet of code that creates the layout

Layout
   Position (3.94792,2.13542) Units "in"
   Width 6.625 Units "in" Height 4.41667 Units "in"
   Set CoordSys Layout Units "in"
   g_lLayoutWinID = WindowInfo(FrontWindow(),WIN_INFO_WINDOWID) 
   Create Frame                  'This is where it chokes.
   Into Window g_lLayoutWinID
   (0.5,1.1326) (10.5,7.3674)
   Pen (2,2,0)
   Brush (2,16777215,16777215)
   Title "Drought Stress " & g_iYear
   FillFrame On
   Create Frame
   Into Window g_lLayoutWinID
   (9.0861,4.3931) (10.409,7.2014)
   Pen (2,2,0)
   Brush (2,16777215,16777215)
   Title "Legend of Drought Stress " & g_iYear
   FillFrame Off
Set Layout Ruler On Pagebreaks On Frame Contents Active
   Zoom 47.4265 Center (6.5323,4.25) Extents To Fit

I am using MapInfo/MapBasic 7.5

Any ides? I have never run across this before could it be something with 7.5?

Tim Fast
Pioneer Hi-Bred International, Inc.
[EMAIL PROTECTED]



This communication is for use by the intended recipient and contains
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean

http://www.DuPont.com/corp/email_disclaimer.html





--


Robert Crossley
Agtrix P/L
9 Short St
PO Box 63
New Brighton 2483
Far Southern Queensland
AUSTRALIA

153.549004 E 28.517344 S

P: 02 6680 1309
F: New Connection
M: 0419 718 642
E: [EMAIL PROTECTED]
W: www.agtrix.com
W: www.wotzhere.com

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 11170



Reply via email to