cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

session. Select use help

DengXing
4-Participant

session. Select use help

Dear teacher:
I use JLINK development to activate the part in the component to select the surface, but only the activated component can be selected, and the surface features outside the activated component cannot be selected. Which teacher knows to help me, thank you.
 
SelectionOptions opts = pfcSelect.SelectionOptions_Create("sldedge,surface"); 
opts.SetMaxNumSels(new Integer(1));
Selections sels = session.Select(opts, null); 
1 ACCEPTED SOLUTION

Accepted Solutions
sjuraj
13-Aquamarine
(To:DengXing)

The method wfcSelect.wfcSelect.WSelectionOptions_Create allows you to set options for selecting objects by specifying the selection attribute. The input arguments are:
• OptionKeywords—Specifies the selection filter.
• MaxNumSels—Specifies the maximum number of selections.
• SelEnvOpts—Specifies the selection attribute set using the method wfcSelect.WSelectionOptions.SetSelEnvOptions.
The method wfcSelect.WSelectionOptions.GetSelEnvOptions retrieves the selection attribute.
The method wfcSelect.wfcSelect.SelectionEnvironmentOption_Create creates a data object of type SelectionEnvironmentOption that contains information about the attributes for the interactive selection in Creo Parametric user interface. Use the method wfcSelect.SelectionEnvironmentOption.SetAttribute to set the selection attribute. The following attribute types are available:
• SELECT_DONE_REQUIRED—Specifies that user has to click OK in the Select dialog box to get the selected items.
• SELECT_BY_MENU_ALLOWED—Specifies that search tool is available in the method pfcSession.BaseSession.Select when the attribute value is set to 1, which is the default value.
• SELECT_BY_BOX_ALLOWED—Specifies that user must draw a bounding box to get the items selected within the box.
• SELECT_ACTIVE_COMPONENT_IGNORE—Specifies that user can select items external to the activate component.
• SELECT_HIDE_SEL_DLG—Specifies that the Select dialog box must be hidden.
The method wfcSelect.SelectionEnvironmentOption.GetAttribute retrieves the selection attribute.
Use the method wfcSelect.SelectionEnvironmentOption.SetAttributeValue to get the integer value of the attributes set in the selection object.
The method wfcSelect.WSelection.Verify verifies if the content of the selection object is valid.
The method wfcSelect.WSelection.GetWindow retrieves the window where the selection was made.

View solution in original post

3 REPLIES 3
sjuraj
13-Aquamarine
(To:DengXing)

The method wfcSelect.wfcSelect.WSelectionOptions_Create allows you to set options for selecting objects by specifying the selection attribute. The input arguments are:
• OptionKeywords—Specifies the selection filter.
• MaxNumSels—Specifies the maximum number of selections.
• SelEnvOpts—Specifies the selection attribute set using the method wfcSelect.WSelectionOptions.SetSelEnvOptions.
The method wfcSelect.WSelectionOptions.GetSelEnvOptions retrieves the selection attribute.
The method wfcSelect.wfcSelect.SelectionEnvironmentOption_Create creates a data object of type SelectionEnvironmentOption that contains information about the attributes for the interactive selection in Creo Parametric user interface. Use the method wfcSelect.SelectionEnvironmentOption.SetAttribute to set the selection attribute. The following attribute types are available:
• SELECT_DONE_REQUIRED—Specifies that user has to click OK in the Select dialog box to get the selected items.
• SELECT_BY_MENU_ALLOWED—Specifies that search tool is available in the method pfcSession.BaseSession.Select when the attribute value is set to 1, which is the default value.
• SELECT_BY_BOX_ALLOWED—Specifies that user must draw a bounding box to get the items selected within the box.
• SELECT_ACTIVE_COMPONENT_IGNORE—Specifies that user can select items external to the activate component.
• SELECT_HIDE_SEL_DLG—Specifies that the Select dialog box must be hidden.
The method wfcSelect.SelectionEnvironmentOption.GetAttribute retrieves the selection attribute.
Use the method wfcSelect.SelectionEnvironmentOption.SetAttributeValue to get the integer value of the attributes set in the selection object.
The method wfcSelect.WSelection.Verify verifies if the content of the selection object is valid.
The method wfcSelect.WSelection.GetWindow retrieves the window where the selection was made.

sjuraj
13-Aquamarine
(To:sjuraj)

So, SELECT_ACTIVE_COMPONENT_IGNORE would help you, but wfc package is paid one

DengXing
4-Participant
(To:sjuraj)

Thank you very much for your answer.

Top Tags