Greetings List, I'm trying to do a simple little routine here to mark the centroid of a single section line (two node line) with a point object. I get to the point of saving the active table then creating the point within it, but I don't want to have to specify the table name (ie, I want this to work on any table I have, all have the same two columns described below).
Update Selection Set XCORD = CentroidX(Obj) 'Returns the xcoord of the object Update Selection Set YCORD = CentroidY(Obj) 'Returns the yccord of the object Delete Object From Selection 'Deletes only the graphic line object leaving data I presume that just as if you use the menu option to "Create Points", the table must be saved first before you can insert an object at the centroid from above. From here I'm a little stumped.... Commit [currently_active_table] 'Save the table currently being edited Update [currently_active_table] 'Update currently active table Set obj = CreatePoint(xcord, ycord) 'Create a point object only for the record updated previously I may be going about this all wrong, or perhaps I will need to create a temporary table from the selected object and work from it???? Would appreciate any help here. Thanks, Dave -- Outgoing mail is certified Virus Free Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.2/170 - Release Date: 11/15/2005 _______________________________________________ Mapinfo-l mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
