<?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 Exception while retrieving model  - pfcExceptions$XToolkitCommError - Jlink Async App in Customization</title>
    <link>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718094#M10196</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for replying to my earlier queries, please help me with this.&lt;/P&gt;
&lt;P&gt;I have written a Java Async App which loads a model(drawing) in session and then generates its PDF via&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Drawing.Export(filename, pdfexportinstructions);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I occasionally get an exception "&lt;STRONG&gt;pfcExceptions$XToolkitCommError"&amp;nbsp;&lt;/STRONG&gt;while exporting or sometimes while retrieving/displaying model. And the exception is random, which is making it hard to debug.&lt;/P&gt;
&lt;P&gt;I am using &lt;EM&gt;session.RetrieveModel(Model Descriptor)&lt;/EM&gt; to get model from current working directory.&lt;BR /&gt;&lt;BR /&gt;If you need any information else, please ask. Quick help would be appreciated. Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 11 Mar 2021 10:57:40 GMT</pubDate>
    <dc:creator>hamzawaseem</dc:creator>
    <dc:date>2021-03-11T10:57:40Z</dc:date>
    <item>
      <title>Exception while retrieving model  - pfcExceptions$XToolkitCommError - Jlink Async App</title>
      <link>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718094#M10196</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for replying to my earlier queries, please help me with this.&lt;/P&gt;
&lt;P&gt;I have written a Java Async App which loads a model(drawing) in session and then generates its PDF via&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Drawing.Export(filename, pdfexportinstructions);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I occasionally get an exception "&lt;STRONG&gt;pfcExceptions$XToolkitCommError"&amp;nbsp;&lt;/STRONG&gt;while exporting or sometimes while retrieving/displaying model. And the exception is random, which is making it hard to debug.&lt;/P&gt;
&lt;P&gt;I am using &lt;EM&gt;session.RetrieveModel(Model Descriptor)&lt;/EM&gt; to get model from current working directory.&lt;BR /&gt;&lt;BR /&gt;If you need any information else, please ask. Quick help would be appreciated. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 10:57:40 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718094#M10196</guid>
      <dc:creator>hamzawaseem</dc:creator>
      <dc:date>2021-03-11T10:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while retrieving model  - pfcExceptions$XToolkitCommError - Jlink Async App</title>
      <link>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718151#M10199</link>
      <description>&lt;P&gt;When retrieving non-existing model (or model which can not be found) its normal when exeption is thrown.&lt;/P&gt;
&lt;P&gt;When retrieving model which is not in working dir or search path or session you have to use RetrieveModelWithOpts() instead.&lt;/P&gt;
&lt;P&gt;When exporting pdf you must have properly configured PdfOptions and ExportInstructions. Eg your path is wrong or contain not allowed characters (such as &amp;lt; which is part of filename on family table instance).&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 13:21:02 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718151#M10199</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2021-03-11T13:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while retrieving model  - pfcExceptions$XToolkitCommError - Jlink Async App</title>
      <link>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718168#M10200</link>
      <description>&lt;P&gt;Thanks for quick response.&lt;/P&gt;
&lt;P&gt;My drawings are in working directory and there are no special characters in filename. Even with same file, I sometimes get the mentioned exception.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For PDF Options I assume I am using the correct code, since it has generated PDFs many times. Here it is&lt;/P&gt;
&lt;P&gt;PDFExportInstructions Mypdfexportinstructions = pfcExport.PDFExportInstructions_Create();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PDFOptions Myoptions = PDFOptions.create();&lt;BR /&gt;PDFOption MyPdfOption_Color = pfcExport.PDFOption_Create();&lt;BR /&gt;MyPdfOption_Color.SetOptionType(PDFOptionType.PDFOPT_COLOR_DEPTH);&lt;BR /&gt;MyPdfOption_Color.SetOptionValue(pfcArgument.CreateIntArgValue(PDFColorDepth._PDF_CD_COLOR));&lt;BR /&gt;Myoptions.append(MyPdfOption_Color);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PDFOption MyPdfOption_Layer = pfcExport.PDFOption_Create();&lt;BR /&gt;MyPdfOption_Layer.SetOptionType(PDFOptionType.PDFOPT_LAYER_MODE);&lt;BR /&gt;MyPdfOption_Layer.SetOptionValue(pfcArgument.CreateIntArgValue(PDFLayerMode._PDF_LAYERS_NONE));&lt;BR /&gt;Myoptions.append(MyPdfOption_Layer);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PDFOption MyPdfOption_Launcher = pfcExport.PDFOption_Create();&lt;BR /&gt;MyPdfOption_Launcher.SetOptionType(PDFOptionType.PDFOPT_LAUNCH_VIEWER);&lt;BR /&gt;MyPdfOption_Launcher.SetOptionValue(pfcArgument.CreateBoolArgValue(false));&lt;BR /&gt;Myoptions.append(MyPdfOption_Launcher);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mypdfexportinstructions.SetOptions(Myoptions);&lt;BR /&gt;proeDrawing.Export(filename, Mypdfexportinstructions);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any idea?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 14:00:38 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718168#M10200</guid>
      <dc:creator>hamzawaseem</dc:creator>
      <dc:date>2021-03-11T14:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while retrieving model  - pfcExceptions$XToolkitCommError - Jlink Async App</title>
      <link>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718356#M10201</link>
      <description>&lt;P&gt;Try to set file path to both PDFExportInstructions and Drawing.Export .. Make sure the ".pdf" extension is in the path and path is absolute path (eg c:/users/user_name/desktop/test.pdf). This is working for me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 07:32:05 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/718356#M10201</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2021-03-12T07:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while retrieving model  - pfcExceptions$XToolkitCommError - Jlink Async App</title>
      <link>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/723251#M10237</link>
      <description>&lt;P&gt;Thank you, this did the trick! No error now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 11:48:51 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Customization/Exception-while-retrieving-model-pfcExceptions-XToolkitCommError/m-p/723251#M10237</guid>
      <dc:creator>hamzawaseem</dc:creator>
      <dc:date>2021-04-08T11:48:51Z</dc:date>
    </item>
  </channel>
</rss>

