"oTarget = Erase(oTarget, oCutter)" works wery well, and by this way the table is updated only with "Update __TARGET Set OBJ = oTarget" and not directly by "Objects Erase Into Target....."
Thank you very much Christophe -----Message d'origine----- De : Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED] Envoy� : mercredi 17 novembre 2004 16:57 � : Christophe Brabant; MapInfo Help Objet : RE: MI-L RE : MI-L Holes into a Region ? Try this in stead: '**************************************** Dim oTarget, oCutter As Object '**Selecting the "parent" Region '** MAKE SURE ONLY ONE RECORD IS SELECTED !!! Select * From mytable Where RowID=id1 Into __TARGET NoSelect '**Fetching the target object Fetch First From __TARGET oTarget = __TARGET.OBJ '**Selecting cutter Region Select Obj From mytable Where RowId=id2 Into __CUTTER NoSelect '**Fetching the cutter object Fetch First From __CUTTER oCutter = __CUTTER.OBJ '**Cutter a hole in the target with the cutter oTarget = Erase(oTarget, oCutter) '**Updating the target record Update __TARGET Set OBJ = oTarget '**Closing temp tables Close Table __TARGET Close Table __CUTTER '**************************************** HTH, 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: Christophe Brabant [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 2:58 PM To: MapInfo Help Subject: MI-L RE : MI-L Holes into a Region ? It works, but i would like to do that automatically with Mapbasic 5 (i know, it's an old version !) The method I use is : 1)Selecting the "parent" Region =============================== Select Obj From mytable Where RowID=id1 2)Setting target ================ Set Target On 3)Selecting "child" Region ========================== Select Obj From mytable Where RowId=id2 4)Merging the regions, keeping data into the row ================================================ Objects Erase Into Target Data col1=col1, col2, col2, coln=coln It works, but the line with rowid id1 is deleted from mytable, and another line is added AT THE END of this table I don't understand Thank you for you help Christophe -----Message d'origine----- De : Stephen Morris [mailto:[EMAIL PROTECTED] Envoy� : mardi 16 novembre 2004 16:59 � : 'Christophe Brabant'; [EMAIL PROTECTED] Objet : RE: MI-L Holes into a Region ? Draw the main region Draw the hole Select the main region Pick Objects>Set Target Select the hole Pick Objects Erase - this puts the hole into the region Delete the hole region - it is no longer required. I believe there are other routes to the same result HTH Stephen -----Original Message----- From: Christophe Brabant [mailto:[EMAIL PROTECTED] Sent: 16 November 2004 15:52 To: [EMAIL PROTECTED] Subject: MI-L Holes into a Region ? Hi Does someone know how to draw the holes into a Region ? (that means, for example, that if I click with the mouse into the hole, the polyline or region is not detected) Thank you - Chris --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.796 / Virus Database: 540 - Release Date: 13/11/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.796 / Virus Database: 540 - Release Date: 13/11/2004 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14070 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14092 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14095 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14109
