Hi~All,
We are trying toset section options in drawing view with Toolkit, but can't find any direct API for this.
Does anyone know how to set section options in drawing view?
Anysuggest will be fully appreciated~
Thanks a lot
Shu-Fan
tkuse.pdf - page 1085
Sections of a View
Functions Introduced:
• ProDrawingViewSectionTypeGet()
• ProDrawingView2DSectionGet()
• ProDrawingView2DSectionSet()
• ProDrawingView2DSectionNumberGet()
• ProDrawingView3DSectionGet()
• ProDrawingView3DSectionSet()
• ProDrawingViewSinglepartSectionGet()
• ProDrawingViewSinglepartSectionSet()
This what you are looking for?
Hi~Yaroslav,
Thanks for your quick reply,
That is what we needed, but with some problem.
Due to some of our customers still using WF4, we are using WF4's APIs. (sorry, it's my fault, not checking higher versions...)
Those APIs are new introduced in Creo/Elements, is there any way to doing this in WF4? or ways to instead?
The worst case, we plan to use ProMacro() toreplace those APIs.
But facing another problem, we can't auto select drawing view after ProDrawingGeneralviewCreate() to let the ProMacro() start.
(ProMacro() start with right mouse button click to open menu)
Is there any way to auto select drawing view?
Thanks a lot
Shu-Fan
Hello!
I'm not sure, but you can try
Add the view to selection, then Selection -> Highlighting
Functions Introduced:
• ProSelectionHighlight()
• ProSelectionDisplay()
• ProSelectionUnhighlight()
In Reply to Shu-Fan Wang:
Hi~Yaroslav,
Thanks for your quick reply,
That is what we needed, but with some problem.
Due to some of our customers still using WF4, we are using WF4's APIs. (sorry, it's my fault, not checking higher versions...)
Those APIs are new introduced in Creo/Elements, is there any way to doing this in WF4? or ways to instead?
The worst case, we plan to use ProMacro() toreplace those APIs.
But facing another problem, we can't auto select drawing view after ProDrawingGeneralviewCreate() to let the ProMacro() start.
(ProMacro() start with right mouse button click to open menu)
Is there any way to auto select drawing view?
Thanks a lot
Shu-Fan
Hello all,
Shu-Fan, Yaroslav is correct - you would need to use a selection buffer and applyyour macro to an entity ( view) stored in the buffer.
In WF4one of theways to get to a view (ProView), besides user interactive selection, is to keep a map (STL container) of view names in a drawingby callingeither visit or collect functionaftersome ProNotify events.ProModelitemByNameInit works with those view names andinitiates ProModelitem which should be used in ProSelectionAlloc.
You could also try to use pre wildfire macro syntax '#..' by name or by ID option but I don't even know where to look for old books.
HIH.
Feliks.
In Reply to Shu-Fan Wang:
Hi~Yaroslav,
Thanks for your quick reply,
That is what we needed, but with some problem.
Due to some of our customers still using WF4, we are using WF4's APIs. (sorry, it's my fault, not checking higher versions...)
Those APIs are new introduced in Creo/Elements, is there any way to doing this in WF4? or ways to instead?
The worst case, we plan to use ProMacro() toreplace those APIs.
But facing another problem, we can't auto select drawing view after ProDrawingGeneralviewCreate() to let the ProMacro() start.
(ProMacro() start with right mouse button click to open menu)
Is there any way to auto select drawing view?
Thanks a lot
Shu-Fan
Hello all,
We still failed to auto select view by the Toolkit.
We found that trail file cando the selection, combine that with ProMacro(), we can setXsection to the drawing views.
It's not a good solution, but we can accept that (Only on WF4.0).
Thanks for all your kindly help~
Shu-Fan,
In Reply to Feliks Veysman:
Hello all,
Shu-Fan, Yaroslav is correct - you would need to use a selection buffer and applyyour macro to an entity ( view) stored in the buffer.
In WF4one of theways to get to a view (ProView), besides user interactive selection, is to keep a map (STL container) of view names in a drawingby callingeither visit or collect functionaftersome ProNotify events.ProModelitemByNameInit works with those view names andinitiates ProModelitem which should be used in ProSelectionAlloc.
You could also try to use pre wildfire macro syntax '#..' by name or by ID option but I don't even know where to look for old books.
HIH.
Feliks.
Hi,
I have wriiten a code that select existing datum plane by it's name
ProSelection selectDatumPlane(wchar_t* inName)
{
ProMdl model;
ProError status = ProMdlCurrentGet(&model);
ProModelitem item;
status = ProModelitemByNameInit(model,PRO_SURFACE,inName,&item);
ProSelection modelSelection = nullptr;
ProError err = ProSelectionAlloc(NULL,&item,&modelSelection);
if(err == PRO_TK_BAD_INPUTS)
return modelSelection;
return modelSelection;
}
you can refer this code.
Change as per your requirement for automatic selection of view.