<?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: ProDrawingView2DSectionSet() returning PRO_TK_BAD_INPUTS (-2) for HALF section even with manu... in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/ProDrawingView2DSectionSet-returning-PRO-TK-BAD-INPUTS-2-for/m-p/1057973#M14816</link>
    <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/1034945"&gt;@VP_14440689&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your post.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.&lt;BR /&gt;&lt;BR /&gt;Also, feel free to add any additional information you think might be relevant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2026 15:34:28 GMT</pubDate>
    <dc:creator>Catalina</dc:creator>
    <dc:date>2026-03-10T15:34:28Z</dc:date>
    <item>
      <title>ProDrawingView2DSectionSet() returning PRO_TK_BAD_INPUTS (-2) for HALF section even with manual plan</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/ProDrawingView2DSectionSet-returning-PRO-TK-BAD-INPUTS-2-for/m-p/1056890#M14783</link>
      <description>&lt;P class=""&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;I am working in Creo Parametric using Pro/Toolkit (classic C API).&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;I am trying to programmatically apply a HALF section to an existing drawing view using:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;CODE&gt;&lt;SPAN&gt;ProDrawingView2DSectionSet()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;The plane selection is done interactively using &lt;/SPAN&gt;&lt;CODE&gt;&lt;SPAN&gt;ProSelect()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;, and the selection succeeds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the relevant code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;Questions:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN&gt;Does the section name (&lt;/SPAN&gt;&lt;CODE&gt;&lt;SPAN&gt;sec_name_out&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;) need to already exist in the model before calling &lt;/SPAN&gt;&lt;CODE&gt;&lt;SPAN&gt;ProDrawingView2DSectionSet&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN&gt;For HALF sections, does the plane selection need to be from the model window rather than the drawing?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN&gt;Is there any additional requirement (like creating the section definition first) before applying a half section?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN&gt;Does the view need to be a specific type (e.g., general view only)?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;&lt;SPAN&gt;Manually, I can create the half section using the same reference plane without any issue. But programmatically it is not accepting the plane.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;Any guidance on the correct workflow for creating or assigning a HALF section via Toolkit would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;ProSelection* sel_array = NULL;
int n_sels = 0;

status = ProSelect(
    "datum",
    1,
    NULL,
    NULL,
    NULL,
    NULL,
    &amp;amp;sel_array,
    &amp;amp;n_sels);

error_utils::CheckError(status, "ProSelect");

if (status != PRO_TK_NO_ERROR || n_sels == 0)
{
    logger::log_info("Plane selection failed.");
    return status;
}

ProSelection plane_sel = sel_array[0];

status = ProDrawingView2DSectionSet(
    current_drw,
    general_view,
    sec_name_out,
    PRO_VIEW_SECTION_AREA_HALF,
    plane_sel,
    NULL,
    NULL);

error_utils::CheckError(status, "ProDrawingView2DSectionSet");

ProSelect succeeds, but
ProDrawingView2DSectionSet returns:

PRO_TK_BAD_INPUTS (-2)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Mar 2026 14:49:15 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/ProDrawingView2DSectionSet-returning-PRO-TK-BAD-INPUTS-2-for/m-p/1056890#M14783</guid>
      <dc:creator>VP_14440689</dc:creator>
      <dc:date>2026-03-03T14:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: ProDrawingView2DSectionSet() returning PRO_TK_BAD_INPUTS (-2) for HALF section even with manu...</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/ProDrawingView2DSectionSet-returning-PRO-TK-BAD-INPUTS-2-for/m-p/1057973#M14816</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/1034945"&gt;@VP_14440689&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your post.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.&lt;BR /&gt;&lt;BR /&gt;Also, feel free to add any additional information you think might be relevant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2026 15:34:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/ProDrawingView2DSectionSet-returning-PRO-TK-BAD-INPUTS-2-for/m-p/1057973#M14816</guid>
      <dc:creator>Catalina</dc:creator>
      <dc:date>2026-03-10T15:34:28Z</dc:date>
    </item>
  </channel>
</rss>

