Solid Edge How to get selected occurrence object in sub assembly by select set in Solid Edge API?

2021-10-06T23:57:01Z
PART/SHEETMETAL

Summary


Details

How to get selected occurrence object in sub assembly by select set in Solid Edge API?



Solution

User can get selected occurrence object in sub assembly by reference pointer object.
Like,

if (selType == igReference)
 {
 SolidEdgeFramework::ReferencePtr refPtr = selPtr;
                                                 
 OccurrencePtr SubRefPtr= (OccurrencePtr)refPtr->Object;
 CString SubOccName = SubRefPtr->Name; //add this line
 ::MessageBox(NULL, SubOccName, _T("Occurrence Name is : "), MB_OK); 
 }

Hardware/Software Configuration

Platform: AMD64
OS: windows
OS Version: 864
Product: SOLID_EDGE
Application: AUTOMATION
Version: V220MP9
Function: API_DOCUMENT

Ref: 002-8165782

KB Article ID# PL8165782

Contents

SummaryDetails

Associated Components

PART/SHEETMETAL: FEATURES