<?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 回复： How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11194129#M2527</link>
    <description>&lt;P&gt;Hi Thomas,&lt;BR /&gt;The sample code you provided solved my problem, thanks a lot.&lt;/P&gt;&lt;P&gt;Also, I need to continue my development, I have been looking in the forums, how to use objectARX to develop a function that does the same as the "FLATSHOT" command, it seems difficult to achieve.&lt;/P&gt;&lt;P&gt;I tried to use SendCommand to trigger the "FLATSHOT" command, but it always pops up the dialog, other than that, I didn't find any relevant information, do you have a better way?&lt;/P&gt;</description>
    <pubDate>Thu, 26 May 2022 06:38:19 GMT</pubDate>
    <dc:creator>it</dc:creator>
    <dc:date>2022-05-26T06:38:19Z</dc:date>
    <item>
      <title>How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11191721#M2525</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;Does anyone know how to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api? I've been looking for a long time and haven't found any usable examples, can anyone help?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-05-25_164210.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1071663iFBA28328C7D976DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2022-05-25_164210.png" alt="2022-05-25_164210.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 08:46:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11191721#M2525</guid>
      <dc:creator>it</dc:creator>
      <dc:date>2022-08-24T08:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11192892#M2526</link>
      <description>&lt;P&gt;For example with the code below.&lt;/P&gt;
&lt;P&gt;I have attached a DWG with a small triangle that can be used as "curve to sweep".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;void cmdSweep()
{
	ads_point    pt;
	ads_name     ent;
	AcDbObjectId objId, pathId;
	Acad::ErrorStatus es;

	if (acedEntSel(_T("\nSelect curve or region to sweep: "), ent, pt) != RTNORM)
		return;

	if (acdbGetObjectId(objId, ent) != Acad::eOk) //ads_name--&amp;gt;AcDbObjectId
		return;

	if (acedEntSel(_T("\nSelect sweep path: "), ent, pt) != RTNORM)
		return;
	if (acdbGetObjectId(pathId, ent) != Acad::eOk) //ads_name--&amp;gt;AcDbObjectId
		return;

	AcDbDatabase* pDB = objId.database();
	AcDb3dSolid* solid = new AcDb3dSolid;
	AcDbEntity* pSweepEnt;
	AcDbCurve* path;
	if ((es = acdbOpenObject(path, pathId, AcDb::kForRead)) == Acad::eOk)
	{
		if ((es = acdbOpenObject(pSweepEnt, objId, AcDb::kForRead)) == Acad::eOk)
		{
			AcDbSweepOptions sweepOpts;
			sweepOpts.setAlignStart(true);
			sweepOpts.setMiterOption(AcDbSweepOptions::kDefaultMiter);
			solid-&amp;gt;setDatabaseDefaults(pDB);
			es = solid-&amp;gt;createSweptSolid(pSweepEnt, path, sweepOpts);
			if (!es)
			{
				es = postToDb(solid, pSweepEnt-&amp;gt;database());
				if (!es)
					solid-&amp;gt;close();
				else
					delete solid;
			}

			pSweepEnt-&amp;gt;close();
		}
		path-&amp;gt;close();
	}	
}

Acad::ErrorStatus postToDb(AcDbEntity* ent, AcDbDatabase *pDB) {
	AcDbObjectId IdModelSpace = acdbSymUtil()-&amp;gt;blockModelSpaceId(pDB);    
	AcDbBlockTableRecord* model;
	Acad::ErrorStatus es;
	if ((es = acdbOpenObject(model, IdModelSpace, AcDb::kForWrite)) == Acad::eOk)
	{
		es = model-&amp;gt;appendAcDbEntity(ent);
		model-&amp;gt;close();
	}
	return es;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 16:32:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11192892#M2526</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2022-05-25T16:32:25Z</dc:date>
    </item>
    <item>
      <title>回复： How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11194129#M2527</link>
      <description>&lt;P&gt;Hi Thomas,&lt;BR /&gt;The sample code you provided solved my problem, thanks a lot.&lt;/P&gt;&lt;P&gt;Also, I need to continue my development, I have been looking in the forums, how to use objectARX to develop a function that does the same as the "FLATSHOT" command, it seems difficult to achieve.&lt;/P&gt;&lt;P&gt;I tried to use SendCommand to trigger the "FLATSHOT" command, but it always pops up the dialog, other than that, I didn't find any relevant information, do you have a better way?&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 06:38:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11194129#M2527</guid>
      <dc:creator>it</dc:creator>
      <dc:date>2022-05-26T06:38:19Z</dc:date>
    </item>
    <item>
      <title>回复： How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11194580#M2528</link>
      <description>&lt;P&gt;You might take a look at the "HLR API" (HLR=Hidden Line Removal): &amp;lt;ObjectARX&amp;gt;\utils\HlrApi. See the sample there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For AcDb3dSolid, AcDbSurface, AcDbBody, and AcDbRegion entities you can also use &lt;FONT face="courier new,courier"&gt;AcDbSection&lt;/FONT&gt; : Create an &lt;FONT face="courier new,courier"&gt;AcDbSection&lt;/FONT&gt; object with a section plane parallel to the XY plane and above the scene you want to take a flatshot from. Use the method&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;Acad::ErrorStatus AcDbSection::generateSectionGeometry(
	const AcArray&amp;lt;AcDbEntity*&amp;gt;&amp;amp; entset,       // input entities
	AcArray&amp;lt;AcDbEntity*&amp;gt;&amp;amp; intBoundaryEnts,    // out
	AcArray&amp;lt;AcDbEntity*&amp;gt;&amp;amp; intFillEnts,        // out
	AcArray&amp;lt;AcDbEntity*&amp;gt;&amp;amp; backgroundEnts,     // out
	AcArray&amp;lt;AcDbEntity*&amp;gt;&amp;amp; foregroundEnts,     // out
	AcArray&amp;lt;AcDbEntity*&amp;gt;&amp;amp; curveTangencyEnts   // out
) const;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 11:20:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11194580#M2528</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2022-05-26T11:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11352750#M2529</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Hi Thomas,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I am new at objectarx. I tried using your code rebuild on vs2019 but no success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Before that I have successfully created text and line . Thank.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;VS2019 reports the following errors:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-08-11 100232.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1102685iA2F20F1124616574/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-08-11 100232.png" alt="Screenshot 2022-08-11 100232.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 03:05:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11352750#M2529</guid>
      <dc:creator>infrabimtds</dc:creator>
      <dc:date>2022-08-11T03:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11353015#M2530</link>
      <description>&lt;P&gt;Make sure that your project links to&amp;nbsp;acgeoment.lib.&lt;/P&gt;
&lt;P&gt;(Project settings-&amp;gt;Linker-&amp;gt;Input-&amp;gt;Additional dependencies)&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 07:03:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11353015#M2530</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2022-08-11T07:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11353042#M2531</link>
      <description>&lt;P&gt;Note: I used&amp;nbsp;&lt;A title="LibView" href="https://www.codeproject.com/Articles/9310/A-tool-to-view-a-LIB" target="_blank" rel="noopener"&gt;this tool&lt;/A&gt; to create the attached &amp;lt;libname&amp;gt;.h files for the &amp;lt;libname&amp;gt;.lib files in &amp;lt;ARX&amp;gt;\lib-x64.&lt;/P&gt;
&lt;P&gt;Each &amp;lt;libname&amp;gt;.h file include the names all functions and symbols that&amp;nbsp;&amp;lt;libname&amp;gt;.lib exports. So I can easily find out which ARX lib must be included to fix an unresolved external.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 07:25:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11353042#M2531</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2022-08-11T07:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Swept Solid using the objectARX AcDb3dSolid::createSweptSolid api?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11353310#M2532</link>
      <description>Thank you very much. I have solved the problem.</description>
      <pubDate>Thu, 11 Aug 2022 10:14:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-create-a-swept-solid-using-the-objectarx-acdb3dsolid/m-p/11353310#M2532</guid>
      <dc:creator>infrabimtds</dc:creator>
      <dc:date>2022-08-11T10:14:45Z</dc:date>
    </item>
  </channel>
</rss>

