Skip to main content
10-Marble
February 16, 2026
Solved

Regarding Toolkit ProDrawingViewDetailCreate and ProDrawingViewPartialVisibleAreaGet APIs cr

  • February 16, 2026
  • 2 replies
  • 163 views

Hi everyone,

I’m working with Creo 11 and trying to use the APIs ProDrawingViewDetailCreate and ProDrawingViewPartialVisibleAreaGet, both of which require a ref_point of type ProSelection. I’m facing consistent “bad input” errors and would appreciate any guidance from someone who has successfully implemented these.

Here’s what I’ve tried so far:

Method 1: Programmatic datum point creation

  • Created a datum point → Success

  • Used ProPointInit → Success

  • Converted using ProPointToGeomitem and Modelitem APIs → Success

  • Attempted ProSelectionAlloc() → Failed to return a valid ProSelection

Method 2: Manual selection approach

  • Created a datum point

  • Selected the point using ProSelection → Success

  • Passed this selection to ProDrawingViewDetailCreate & ProDrawingViewPartialVisibleAreaGet → Both failed with “bad inputs”

Method 3: Drawing entity approach

  • Created a point in the drawing using ProDtlEntityCreate

  • Used ProSelectionAlloc() → Success

  • Passed it to ProDrawingViewDetailCreate & ProDrawingViewPartialVisibleAreaGet → Still getting “bad input” errors

At this point, I suspect I might be missing something about the expected reference context (model space vs drawing space selection, view ownership, or selection type).

Has anyone successfully passed a valid ref_point selection to these APIs in Creo 11? Any example workflow or clarification on what kind of ProSelection these functions strictly expect would be really helpful.

Thanks in advance!

Best answer by VP_14440689

Hello sir, 
I got the source code from community post and it worked, you were right the real challenge was to get the Curvedata i.e to create the spline

from this code its very clear now and now I am able to deal with all those APIs who need Curedata.
Thank you so much for your time and help.

Link - https://community.ptc.com/t5/Customization/Regarding-Toolkit-ProDrawingViewDetailCreate-and/m-p/1055064

 

2 replies

18-Opal
February 16, 2026

Not a datum, it is just the placement/reference point

set x and y with

ProSelectionPoint3dSet( ProPoint3d point, ProSelection *p_prosel);

Just my 2 Cents 🧐😂😉

10-Marble
February 17, 2026

Hi,

Thanks for the suggestion regarding using a placement/reference point with ProSelectionPoint3dSet. I tried multiple approaches based on that idea and wanted to share what I tested and the results I’m seeing.

What I implemented:

  1. View creation

  • I create a general view using ProDrawingGeneralviewCreate.

  • Apply display style and regenerate the view:

    • ProDrawingViewDisplaySet

    • ProDrawingViewRegenerate

  • I can successfully create projected views and an isometric view from the same parent view, so the view itself is valid and visible.

  1. Reference point using ProSelectionPoint3dSet

  • I followed the suggestion to not use a datum/model entity and instead create a placement selection:

    • ProSelectionAlloc(NULL, NULL, &ref_sel)

    • ProSelectionViewSet(general_view, &ref_sel)

    • ProSelectionPoint3dSet(pick_pt, &ref_sel)

  • For the point, I tried:

    • Hard-coded sheet coordinates

    • Center of the view outline

    • A user-picked point via ProMousePickGet

  • All three cases:

    • ProSelectionAlloc → success

    • ProSelectionViewSet → success

    • ProSelectionPoint3dSet → success

  1. Boundary creation

  • I build a circular boundary using:

    • ProArcdataInit(v1, v2, pick_pt, 0, 2*M_PI, radius, &circle)

  • This also succeeds consistently.

  1. Detail view creation

  • Then I call:

    ProDrawingViewDetailCreate(
     current_drw,
     general_view,
     ref_sel,
     &circle,
     view_loc,
     &detail_view
    );
  • Result:

    PRO_TK_BAD_INPUTS (-2)
  1. Additional attempts

  • Tried both:

    • Hardcoded reference point

    • Mouse-picked point inside the parent view

  • Tried placing the detail view well away from the parent view using the parent view outline.

  • Also attempted ProDrawingViewDetailReferenceSet with the same selection → also returns PRO_TK_BAD_INPUTS.

So at this point, I’m able to:

  • Create a valid selection with:

    • View context

    • Point attached using ProSelectionPoint3dSet

  • Create the circular boundary

But ProDrawingViewDetailCreate and ProDrawingViewDetailReferenceSet still report “bad inputs”.

If there’s any additional requirement for the reference point (for example, it needing to lie exactly on projected geometry or needing a model-backed selection instead of a pure view+point selection), I’d appreciate clarification.

Thanks again for the pointer — it helped narrow down the problem significantly.

Community Manager
February 23, 2026

Hello @VP_14440689,

 

It looks like you have some responses from a community expert. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.