Hello Sal, Unfortunately there is no CreateEllipse() function in MapBasic. There is a "create ellipse" statement but that cannot be used directly in an SQL insert statement. There is a CreateCircle(x, y, radius) if that's any use, alternatively you could create a function of your own that returns an ellipse and use that in the SQL statement.
The same is true for "CreateRectangle" but there is a work-around there. You can create a line between opposite corners of a rectangle and then pass that to the minimum bounding rectangle function, MBR(), to get a rectangle. e.g. Insert Into mytable (Obj) Values (MBR(CreateLine (x1, y1, x2, y2))) Regards, Warren Vick Europa Technologies Ltd. http://www.europa-tech.com -----Original Message----- From: Sallyann Smith [mailto:[EMAIL PROTECTED] Sent: 27 February 2005 18:23 To: [email protected] Subject: MI-L MB Syntax problem Hi there, I have what should be a very simple MapBasic task, but I can't get the syntax right. To insert a point object into a table, I use: Insert Into mytable (Obj) Values (CreatePoint x1, y1) and for a line object I use: Insert Into mytable (Obj) Values (CreateLine (x1, y1, x2, y2)) and this always works fine. But I can't create a Rect or Ellipse object the same way. I have tried: Insert Into mytable (Obj) Values (CreateEllipse (x1, y1, x2, y2)) Insert Into mytable (Obj) Values (CreateEllipse (x1, y1) (x2, y2)) Insert Into mytable (Obj) Values (CreateEllipse (x1, y1), (x2, y2)) all of these give me a syntax error when I compile, and the same with CreateRect. I must be doing something wrong, but what? Sal --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 15454
