<?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: Replace format with vartiable format using JLink in System Administration</title>
    <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880064#M29721</link>
    <description>&lt;P&gt;Thank you again but this does not solve my problem.&lt;/P&gt;&lt;P&gt;I want to assign a Variable format with size 1x1, without using any ".frm" for that&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DrawingFormat drawingFormat = null;
drawing.SetSheetFormat(2, drawingFormat, null, null);  // this fails&lt;/LI-CODE&gt;&lt;P&gt;I changed the format manually to variable and read it:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DrawingFormat drawingFormat = drawing.GetSheetFormat(2);&lt;/LI-CODE&gt;&lt;P&gt;Interestingly the value of&amp;nbsp;drawingFormat is null&lt;/P&gt;&lt;P&gt;And I tried to set the value of width and height to 1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;drawing.GetSheetData(2).SetHeight(1);
drawing.GetSheetData(3).SetWidth(1);&lt;/LI-CODE&gt;&lt;P&gt;But it does not work (documentation says&amp;nbsp;&lt;STRONG&gt;GetSheetData&lt;/STRONG&gt; is deprecated)&lt;/P&gt;&lt;P&gt;If I don't find a way to do this JLink I will try to do it with mapkeys&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 11:05:54 GMT</pubDate>
    <dc:creator>dgarcia</dc:creator>
    <dc:date>2023-06-08T11:05:54Z</dc:date>
    <item>
      <title>Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/878018#M29667</link>
      <description>I am using Creo Parametric Release 7.0 and Datecode7.0.4.0&lt;BR /&gt;&lt;BR /&gt;I need to replace the drawing format of sheet 2 of my drawing with Custom Size, 1x1 mm, format. Using JLink</description>
      <pubDate>Mon, 29 May 2023 11:59:55 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/878018#M29667</guid>
      <dc:creator>dgarcia</dc:creator>
      <dc:date>2023-05-29T11:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/878438#M29682</link>
      <description>&lt;P&gt;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/1018"&gt;@dgarcia&lt;/a&gt;,&lt;/P&gt;
&lt;OL&gt;
 &lt;LI&gt;Use J-Link function &lt;STRONG&gt;pfcSheet.SheetOwner.SetCurrentSheetNumber()&lt;/STRONG&gt; to set current drawing sheet.&lt;/LI&gt;
 &lt;LI&gt;Use J-Link function &lt;STRONG&gt;pfcSheet.SheetOwner.SetSheetFormat()&lt;/STRONG&gt; to set new or replace existing drawing format with new format.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 31 May 2023 07:18:19 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/878438#M29682</guid>
      <dc:creator>rghadge</dc:creator>
      <dc:date>2023-05-31T07:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/878738#M29691</link>
      <description>&lt;P&gt;Thanks for the help, but I'm stuck with the function:&lt;/P&gt;&lt;P&gt;voidSetSheetFormat(int&amp;nbsp;SheetNumber,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://community.ptc.com/c-pfcDrawingFormat-DrawingFormat.html" target="_blank" rel="noopener"&gt;DrawingFormat&lt;/A&gt;&amp;nbsp;&lt;STRONG&gt;Format&lt;/STRONG&gt;, /*optional*/ Integer&amp;nbsp;FormatSheetNumber, /*optional*/&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://community.ptc.com/c-pfcModel-Model.html" target="_blank" rel="noopener"&gt;Model&lt;/A&gt;&amp;nbsp;DrawingModel)&lt;/P&gt;&lt;P&gt;How do I define parameter &lt;STRONG&gt;Format&lt;/STRONG&gt; ? I need a variable sheet, and there is no format defined for that. And null does not work&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 07:30:17 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/878738#M29691</guid>
      <dc:creator>dgarcia</dc:creator>
      <dc:date>2023-06-01T07:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/879475#M29707</link>
      <description>&lt;P&gt;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/1018"&gt;@dgarcia&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below sample code changes the format of sheet# 1 in session and uses an existing .frm stored in the working directory&lt;BR /&gt;ModelDescriptor desc = null;&lt;BR /&gt;session.GetCurrentWindow().Activate();&lt;BR /&gt;desc = pfcModel.ModelDescriptor_CreateFromFileName("a0_iso.frm");&lt;BR /&gt;desc.SetPath (""); //frm file is stored in the working directory, set your own format folder path here&lt;BR /&gt;DrawingFormat format = (DrawingFormat) session.RetrieveModelWithOpts(desc, pfcSession.RetrieveModelOptions_Create());&lt;BR /&gt;cur_drw.SetSheetFormat(1, format, null, null); //applies to the first sheet&lt;/P&gt;
&lt;P&gt;Note:&lt;BR /&gt;The Method SetSheetFormat() is designed only to insert a new format sheet in a drawing sheet This method is not designed to replace or remove existing drawing tables that are copied in to drawing from previous format.&lt;BR /&gt;Users should identify and remove the old drawing tables using pfcTable.CheckIfIsFromFormat() and DeleteTable() Example Code Snippet: Tables tables = drw.ListTables(); System.out.println("tables info" + tables.toString()); for (int i = 0; i &amp;lt; tables.getarraysize(); i++) { Table table = tables.get(i); System.out.println("table" + table); if (table.CheckIfIsFromFormat(drwSheetNum) == true) { drw.DeleteTable(table, Boolean.FALSE); } }&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 03:20:27 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/879475#M29707</guid>
      <dc:creator>rghadge</dc:creator>
      <dc:date>2023-06-06T03:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880064#M29721</link>
      <description>&lt;P&gt;Thank you again but this does not solve my problem.&lt;/P&gt;&lt;P&gt;I want to assign a Variable format with size 1x1, without using any ".frm" for that&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DrawingFormat drawingFormat = null;
drawing.SetSheetFormat(2, drawingFormat, null, null);  // this fails&lt;/LI-CODE&gt;&lt;P&gt;I changed the format manually to variable and read it:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DrawingFormat drawingFormat = drawing.GetSheetFormat(2);&lt;/LI-CODE&gt;&lt;P&gt;Interestingly the value of&amp;nbsp;drawingFormat is null&lt;/P&gt;&lt;P&gt;And I tried to set the value of width and height to 1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;drawing.GetSheetData(2).SetHeight(1);
drawing.GetSheetData(3).SetWidth(1);&lt;/LI-CODE&gt;&lt;P&gt;But it does not work (documentation says&amp;nbsp;&lt;STRONG&gt;GetSheetData&lt;/STRONG&gt; is deprecated)&lt;/P&gt;&lt;P&gt;If I don't find a way to do this JLink I will try to do it with mapkeys&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 11:05:54 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880064#M29721</guid>
      <dc:creator>dgarcia</dc:creator>
      <dc:date>2023-06-08T11:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880083#M29724</link>
      <description>&lt;P&gt;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/1018"&gt;@dgarcia&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest to &lt;A href="https://support.ptc.com/apps/case_logger_viewer/cs/auth/ssl/log" target="_blank"&gt;log a case&lt;/A&gt; with PTC Technical Support explaining your use case and share details of what you tried. So that, it can further investigated.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 12:14:08 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880083#M29724</guid>
      <dc:creator>rghadge</dc:creator>
      <dc:date>2023-06-08T12:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880252#M29733</link>
      <description>&lt;P&gt;I have done so, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 08:49:24 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880252#M29733</guid>
      <dc:creator>dgarcia</dc:creator>
      <dc:date>2023-06-09T08:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Replace format with vartiable format using JLink</title>
      <link>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880456#M29737</link>
      <description>&lt;P&gt;&lt;SPAN style="background-color:rgb(255,255,255);color:rgb(24,24,24);font-size:13px;"&gt;Use below available J-Link functions (OTK Java):&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
 &lt;LI&gt;&lt;STRONG&gt;wfcModel.FormatSizeData.GetWidth()&lt;/STRONG&gt;&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;wfcModel.FormatSizeData.SetWidth()&lt;/STRONG&gt;&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;wfcModel.FormatSizeData.GetHeight()&lt;/STRONG&gt;&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;wfcModel.FormatSizeData.SetHeight()&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="background-color:rgb(255,255,255);color:rgb(24,24,24);font-size:13px;"&gt;Note: Above functions will need OTK Java licenses to use in Creo Parametric. For J-Link users, macros can be used as a workaround.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 05:11:03 GMT</pubDate>
      <guid>https://community.ptc.com/t5/System-Administration/Replace-format-with-vartiable-format-using-JLink/m-p/880456#M29737</guid>
      <dc:creator>rghadge</dc:creator>
      <dc:date>2023-06-12T05:11:03Z</dc:date>
    </item>
  </channel>
</rss>

