<?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: Importing Page setup from another file in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6899734#M8749</link>
    <description>&lt;P&gt;Thanks, this idea is clear and straight forward.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would just like to ask you about LPCWSTR type, I haven't seen it before and cant find much in documentation, that's some sort of light weight string type or something?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2017 21:16:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-23T21:16:15Z</dc:date>
    <item>
      <title>Importing Page setup from another file</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6875388#M8747</link>
      <description>&lt;P&gt;Dear colleagues,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an easy way to import Page setup from another file? Practically what you get when you click on "import" in "Page setup manager" dialogue? Are these objects AcDbPlotSettings?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wouldn't like to use acedCommandS, of course, but on the other hand I don't want to open whole new database, search just for that one object in Plot settings dictionary, and close it. Is there any shortcut?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 22:37:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6875388#M8747</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-13T22:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Page setup from another file</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6895565#M8748</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Acad::ErrorStatus ImportPlotSettings(AcDbDatabase *pDbTarget, LPCWSTR pcImportFile, LPCWSTR pcPlotSettingsName)
{
	Acad::ErrorStatus es;
	AcDbDatabase *pDbSource = new AcDbDatabase(false, true); // no defaults, no Document
	es = pDbSource-&amp;gt;readDwgFile(pcImportFile);     // DWG that holds your page setup

	AcDbDictionary *pDict = 0;
	es = pDbSource-&amp;gt;getPlotSettingsDictionary(pDict, AcDb::kForRead);

	if (es == Acad::eOk)
	{
		AcDbObjectId myPlotsettingId;
		es = pDict-&amp;gt;getAt(pcPlotSettingsName, myPlotsettingId); // get your page setup
		pDict-&amp;gt;close();

		AcDbPlotSettings *pPS = NULL, *pPsCopy = NULL;
		if ( (es=acdbOpenObject(pPS, myPlotsettingId, AcDb::kForRead)) == Acad::eOk )
		{
			pPsCopy = new AcDbPlotSettings(false);
			es = pPsCopy-&amp;gt;copyFrom(pPS); 
			pPS-&amp;gt;close();
		}

		if (pPsCopy)
		{
			es = pPsCopy-&amp;gt;addToPlotSettingsDict(pDbTarget);
			if (es == Acad::eOk)
				pPsCopy-&amp;gt;close();
			else
			{
				delete pPsCopy;
				pPsCopy = NULL;
			}
		}		
	}

	delete pDbSource;

	return es;
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 14:10:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6895565#M8748</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2017-02-22T14:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Page setup from another file</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6899734#M8749</link>
      <description>&lt;P&gt;Thanks, this idea is clear and straight forward.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would just like to ask you about LPCWSTR type, I haven't seen it before and cant find much in documentation, that's some sort of light weight string type or something?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 21:16:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6899734#M8749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-23T21:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Importing Page setup from another file</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6899848#M8750</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LPCWSTR&lt;/EM&gt;&lt;/STRONG&gt; is the same as &lt;EM&gt;&lt;STRONG&gt;const ACHAR *&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 21:54:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/importing-page-setup-from-another-file/m-p/6899848#M8750</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2017-02-23T21:54:47Z</dc:date>
    </item>
  </channel>
</rss>

