try this:

msg = "Insert into WindowInfo(FrontWindow(), WIN_INFO_TABLE) (OBJ) Values 
(___oPline)"
MapInfo.do msg

Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel     +45 6311 4900
Direct  +45 6311 4908
Mob     +45 5156 1045
Fax     +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-----Original Message-----
From: rugo100 [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 29, 2005 7:38 PM
To: Peter Horsb�ll M�ller; MapInfo-L
Subject: Re: MI-L Create/alter object help


Yes, that's it. Works perfectly! Thanks.
My next problem is: how can I make visible an object -stored in object var- 
on MAP window/layout?
thx

George.


----- Original Message ----- 
From: "Peter Horsb�ll M�ller" <[EMAIL PROTECTED]>
To: "rugo100" <[EMAIL PROTECTED]>; "MapInfo-L" 
<[email protected]>
Sent: Monday, March 28, 2005 6:58 PM
Subject: RE: MI-L Create/alter object help


I think the problem is that the "Create polyline" statement inserts the 
object into the cosmetic layer of the front mapper if you not specify which 
variable should hold the object or in the table shown in the active browser 
window if this is possible.

Could you try this:

....Mapinfo connected
....TABLE is opened for editing
'Create a variable to hold the object
msg "Dim ___oPline As Object"
MapInfo.do msg
'Create an empty pline object:
msg = "Create Pline Into Variable ___oPline 0"
MapInfo.do msg

Now you should be able to alter your object, eg. adding new nodes

Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT

COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark

Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk/gis


-----Original Message-----
From: rugo100 [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 7:33 PM
To: MapInfo-L
Subject: MI-L Create/alter object help


Hi Listers,
A bit of help needed.

I use MapBasic from VisualBasic
A Table opened for editing, then I want to create an empty polyline object 
then add some node to it (number of nodes not defined yet at object creation 
time) Also I want to see the result on MAP window immediately.

Theoretically the solution is simple, but it does not work (form me) in 
practice

1. create an empty pline object
2. add some nodes to it with "ALTER" command
3. Update table.

What I've tried (from VB):

....Mapinfo connected
....TABLE is opened for editing
'Create an empty pline object:
msg = "Create Pline 0"
MapInfo.do msg

After this I always get error:

Run-time error '-2147352567 (80010009)':
Cannot insert an empty objects into a table or layout. Out of disk space 
while editing table xxxx"

Of course no problem with disk space...

If I create a not empty object it is OK:

msg = "Create Pline 1 (0,0)"
MapInfo.do msg

Question #1: why not allowed to create an "empty" object???
-----------------------------------------------------------------------------------


Next problem:
If I created a not empty object, that is OK then like the next step I want 
to modify it with "ALTER" To do it for ALTER command should know the object 
what to modify.

Question #2: when I create (empty or not empty) object how can I assign it 
to an object variable to be able use it later to altering it???
-----------------------------------------------------------------------------------
I've tried this: (and I always get error: "Variable myOBJ is not defined")

DIM myOBJ as object

msg="Create Pline Into Variable myOBJ 0"
MapInfo.do msg
'add node to object
msg = "Alter Object myOBJ Node Add(10,10)"
MapInfo.do msg

So the real questions what needed to be answer are:

1. How can I create an "empty" object?
2. How can I assigh the created object into an object variable 3. How should 
I use object variable with "ALTER" ?

Any help would appreciated very much.

Thanks

George.
http://web.axelero.hu/rugo100/rc.htm

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





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

Reply via email to