<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: create hatch in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795057#M674</link>
    <description>&lt;P&gt;please look into this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jigneshrana_0-1716544078817.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1366927i723DBCF3AC491C56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jigneshrana_0-1716544078817.png" alt="jigneshrana_0-1716544078817.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2024 09:48:01 GMT</pubDate>
    <dc:creator>jignesh.rana</dc:creator>
    <dc:date>2024-05-24T09:48:01Z</dc:date>
    <item>
      <title>create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12789137#M667</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to create hatch of any object but exclude inner object&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for e.g if one rectangle has text inside then hatch will be exclude that text&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 05:45:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12789137#M667</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-05-22T05:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794901#M668</link>
      <description>&lt;P&gt;You can use&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;Acad::ErrorStatus AcDbHatch::appendLoop(
    Adesk::Int32 loopType, // AcDbHatch::kDefault for a hole in the hatch, AcDbHatch::kExternal for external
    const AcDbObjectIdArray&amp;amp; dbObjIds // ids of the text entities 
);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to create a hole around one or more DB resident (text-) entities. Or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;Acad::ErrorStatus AcDbHatch::appendLoop(
    Adesk::Int32 loopType, 
    const AcGePoint2dArray&amp;amp; vertices, 
    const AcGeDoubleArray&amp;amp; bulges
);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create an arbitrary polyline shaped hole. When you are done call&amp;nbsp;&lt;FONT face="courier new,courier"&gt;AcDbHatch::evaluateHatch()&lt;/FONT&gt; to update the hatch.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 08:36:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794901#M668</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-05-24T08:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794907#M669</link>
      <description>&lt;P&gt;sir could you please share code of objectarx ?&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 08:39:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794907#M669</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-05-24T08:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794941#M670</link>
      <description>&lt;P&gt;here i attached drawing for refrence please look into this hatch is out of object&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 08:54:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794941#M670</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-05-24T08:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794960#M671</link>
      <description>&lt;P&gt;Sample code:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;void cmdHatch()
{
	ads_name           sset = { 0,0 };
	AcDbObjectIdArray outsideIds; // IDs of outer curve(s)/region
	AcDbObjectIdArray holeIds;    // IDs of inner text(s)/pline(s)/region that shall create ONE hole.

	acutPrintf(_T("\nSelect entities that form the outer conture: "));
	if (acedSSGet(NULL, NULL, NULL, NULL, sset) == RTNORM)
	{
		outsideIds.setLogicalLength(0);
		Selset2ObjIdArray(sset, outsideIds);
		acedSSFree(sset);
	}
	else
		return;

	Acad::ErrorStatus es;
	AcDbDatabase* db = acdbHostApplicationServices()-&amp;gt;workingDatabase();
	AcDbHatch* hatch = new AcDbHatch();
	hatch-&amp;gt;setDatabaseDefaults(db);
	es = hatch-&amp;gt;appendLoop(AcDbHatch::kExternal, outsideIds);

	int stat = RTNORM;
	while (stat==RTNORM)
	{
		acutPrintf(_T("\nSelect entities that form one inner hole: "));
		stat = acedSSGet(NULL, NULL, NULL, NULL, sset);
		if (stat == RTNORM)
		{
			holeIds.setLogicalLength(0);
			Selset2ObjIdArray(sset, holeIds);
			acedSSFree(sset);
			es = hatch-&amp;gt;appendLoop(AcDbHatch::kDefault, holeIds);
		}
	}

	hatch-&amp;gt;evaluateHatch();
	postToDb(db, hatch);
}

long Selset2ObjIdArray(ads_name sset, AcDbObjectIdArray&amp;amp; objIdArr) {
	Adesk::Int32 selSetLen = 0, i;
	if (acedSSLength(sset, &amp;amp;selSetLen) != RTNORM)
		return -1;
	ads_name ename;
	AcDbObjectId objId;

	for (i = 0; i &amp;lt; selSetLen; i++)	{
		if (acedSSName(sset, i, ename) == RTNORM) {
			if (acdbGetObjectId(objId, ename) == Acad::eOk)
				objIdArr.append(objId);
		}
	}
	return selSetLen;
}

&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 May 2024 09:06:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794960#M671</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-05-24T09:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794981#M672</link>
      <description>&lt;P&gt;sir please try in this drawing which i attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hatch is out of object&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 09:37:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12794981#M672</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-05-24T09:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795049#M673</link>
      <description>&lt;P&gt;Works perfectly. Did I pick the right entities?&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6353581182112w960h540r635" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6353581182112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6353581182112w960h540r635');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6353581182112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 09:45:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795049#M673</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-05-24T09:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795057#M674</link>
      <description>&lt;P&gt;please look into this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jigneshrana_0-1716544078817.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1366927i723DBCF3AC491C56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jigneshrana_0-1716544078817.png" alt="jigneshrana_0-1716544078817.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 09:48:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795057#M674</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-05-24T09:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795065#M675</link>
      <description>&lt;P&gt;I don't know what you mean. Did you watch the video? Did I select the right entities?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post a DWG that &lt;U&gt;only&lt;/U&gt; contains the entity that defines the outer bounds of the hatch and the text that shall be left out.&lt;/P&gt;
&lt;P&gt;Which AutoCAD version do you use?&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 09:52:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795065#M675</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-05-24T09:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795179#M676</link>
      <description>&lt;P&gt;It looks as if you created a external hatch loop using the bounding points of the MTEXT entity.&lt;/P&gt;
&lt;P&gt;This is what SNOOPENTS from the ArxDbg.arx (&amp;lt;ARX&amp;gt;\samples\database\ARXDBG) shows for the MTEXT:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tbrammer_0-1716546979852.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1366954i048E5C1A48398A63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tbrammer_0-1716546979852.png" alt="tbrammer_0-1716546979852.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And this for the hatch:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tbrammer_1-1716547162412.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1366956iA1945DA270A29248/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tbrammer_1-1716547162412.png" alt="tbrammer_1-1716547162412.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use my code the inner loop will look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tbrammer_2-1716547249828.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1366960i473FA8B488C50810/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tbrammer_2-1716547249828.png" alt="tbrammer_2-1716547249828.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 10:41:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12795179#M676</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-05-24T10:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12876029#M677</link>
      <description>&lt;P&gt;one more help required&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want to set specific color for hatch for e.g red color i tried to set it&amp;nbsp;&lt;/P&gt;&lt;P&gt;hatch-&amp;gt;SetColorIndex(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but its not working&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 12:46:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12876029#M677</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-07-03T12:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12883674#M678</link>
      <description>&lt;LI-CODE lang="cpp"&gt;Acad::ErrorStatus es = hatch-&amp;gt;setColorIndex(1);&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;should work. Please check whether it returns&amp;nbsp;&lt;FONT face="courier new,courier"&gt;es==Acad::eOk&lt;/FONT&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Did you open &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;hatch&lt;/FONT&gt;&lt;/STRONG&gt; for write and close it after changing the color?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe the graphics need a refresh. Try _REGEN or save and reopen the drawing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the hatch isn't "solid" or "gradient" the color is applied to the &lt;EM&gt;pattern&lt;/EM&gt; of the hatch. If no part of the pattern is visible, you will only see the background color of the hatch - or the background itself if the background color is "none". Try&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;AcCmColor color; 
color.setColorIndex(1);
hatch-&amp;gt;setBackgroundColor(color);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 08:32:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/12883674#M678</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-07-08T08:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/13011425#M679</link>
      <description>&lt;P&gt;in this logic if more than one closed polylines/regions in outer polyline then its not work&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 11:57:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/13011425#M679</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-09-10T11:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: create hatch</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/13013220#M680</link>
      <description>&lt;P&gt;please share objectarx code to exclude inner objects more than one including text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please see attachment/image&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jigneshrana_0-1726123957188.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1408381i91E22905D7E9C84B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jigneshrana_0-1726123957188.png" alt="jigneshrana_0-1726123957188.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 07:00:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/create-hatch/m-p/13013220#M680</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-09-12T07:00:34Z</dc:date>
    </item>
  </channel>
</rss>

