Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

How to get Pro/e current selections...

stomata

New member
Help!
I want to get the ProMdl handler of the current selected item interactively. I dunno which object should I use....
ProSelect looks like the one, but I couldn't find any useful functions of it that would do the job.....
Can someone help me on this?
, thanks
 
stomata,


Use the function ProSelbufferSelectionsGet to get an array of ProSelection objects of things that are currently selected. Also read the API Wizard under User's Guide->The Selection Object->Selection Buffer. Good luck!
 
I am trying to setup a thread to collect the selection using ProSelbufferSelectionsGet.
However I keep getting nothing...
and I cannot select anything on the drawing view of Pro/E window.....
I guess I cannot activate the base window while I am having my dialogbox displayed?
smiley19.gif
 
stomata,


You CANNOT put Pro/TOOLKIT API calls in multiple threads. You can have a multi-threaded application but all of the API calls must be in a single thread.
 
williaps said:
stomata,


You CANNOT put Pro/TOOLKIT API calls in multiple threads. You can have a multi-threaded application but all of the API calls must be in a single thread.

that's why I am failed on that...
so how can I use ProSelbufferSelectionsGet as interactive selection...

I got to detect a selection from Pro/E and change my table interactively but without a thread?
 
Are youtalking about havingyour dialogwith the table available while the user is selecting? If you are then that's possible. When you add your command that brings up the dialog there is a parameter for priority that is type uiCmdPriority. You can change its value to have the dialog stay when you're doing selections. Check the function ProCmdActionAdd for reference. You'll see the priority types are:


uiCmdPrioDefault /* Normal-highest priority*/
uiProeImmediate /* Immediate priority - lower than normal*/
uiProeAsynch /* Asynchronous - operates without dismissing other menus or dialogs.*/
uiProe2ndImmediate/* 2nd immediate priority - lower than immediate */
uiProe3rdImmediate/* 3rd immediate priority - lower than 2nd immediate */
uiProeSpinImmediate /* Spin immediate priority - lower than 3nd immediate */
uiCmdNoPriority



Based on your comments I'd guess you're looking for uiProeAsynch so you can have your dialog update based on the selections.


If you need more help please ask.


Bryan
 
The problem is that there is no notification function that can be used to know when a user has selected something (using ProNotificationSet). Therefore I'm not sure how you could accomplish this task.
 
williaps said:
The problem is that there is no notification function that can be used to know when a user has selected something (using ProNotificationSet). Therefore I'm not sure how you could accomplish this task.

you know it's frustrating.... ptc supports just replied me....


<div align="left">Hi Grant,</div>
<div align="left"></div>
<div align="left">Regarding your issue: Customer wants to know if there is a way
to be notified when a user makes a Selection.</div>
<div align="left"></div>
<div align="left">No, there is no way to
automatically, continuously poll for a user selection.</div>
<div align="left"></div>
<div align="left">Regards,

btw, thank you bruppert for the info, it helps~~
smiley2.gif

</div>
 
It's possible if I can start ProSelect() and my dilog at the same time and have them running in parallel.
Then I can use the action function pointer assigned in ProSelFunctions to catch the user selection....
 
As long as you're having your Toolkit app get the selection then you can do it. Otherwise if you just want to intercept a normalPro/E selectionthen you would need a notification but there are none - as Patrick stated earlier.
 
bruppert said:
As long as you're having your Toolkit app get the selection then you can do it. Otherwise if you just want to intercept a normalPro/E selectionthen you would need a notification but there are none - as Patrick stated earlier.

yeah I understand
I was saying that because I am hoping they will have this feature next release....
btw, they will have VBA support next release
 

Sponsor

Back
Top