Hello George,

AFAIK you can not use VB as a replacement for mapbasic, since you are restricted to the same commands that can be typed in the mapbasic window inside MapInfo.

Defining variables and setting up any kind of looping and branching are a few of those things not possible, so you will have to rethink your application layout, if you don't have mapbasic.

I could be wrong, if so someone will probably speak up.

Regards
Uffe


----- Original Message ----- From: "rugo100" <[EMAIL PROTECTED]>
To: "MapInfo-L" <[email protected]>
Sent: Monday, March 28, 2005 7:33 PM
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: 15817



Reply via email to