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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

skeleton

SS4598
12-Amethyst

skeleton

Hello,

I have multiple skeleton in my assembly. I use to ProAsmSkeletonGet() to retrieve skeleton as ProMdl Skel. It retrieves first skeleton from model. I want to get also the next skeletons to perform operations on feature in it. Can anyone one suggest how do I retrieve second skeleton with help of ProAsmSkeletonGet() or any similar function to perform operation on feature in other skeleton in same assembly.

 

 

3 REPLIES 3
FV
17-Peridot
17-Peridot
(To:SS4598)

there is a function ProMdlIsSkeleton - the user guide has a sample code TestAsm.c - copy/paste

HannesBuxbaum
6-Contributor
(To:SS4598)

To get all skeletons, traverse your assembly (only one level or recursively) using ProSolidFeatVisit(): use the following filter function to visit only components that are skeletons:

 

ProError MdlSkelettonFind_FeatFiltAct(ProFeature* pFeature, ProAppData pAppData){
	ProError			iStatus = PRO_TK_CONTINUE;	//	Default filter result: deny visiting this feature (filtered out)
	ProError			pErr;
	ProFeattype			pFeattype;
	ProFeatStatus		pFeatStatus;
	ProMdl				pModel;
	ProBoolean			bIsSkeleton;
	
	if (pFeature->type == PRO_FEATURE){
		pErr = ProFeatureTypeGet(pFeature, &pFeattype);
			if (pErr != PRO_TK_NO_ERROR) { return PRO_TK_CANT_ACCESS; }
		if (pFeattype != PRO_FEAT_COMPONENT){	//	Feature is a component? 
			return iStatus;						//	Skip non-component features
		}else{
			pErr = ProFeatureStatusGet(pFeature, &pFeatStatus);
				if (pErr != PRO_TK_NO_ERROR) { return PRO_TK_CANT_ACCESS; }

			//	Optional: filter for features that are in the state "active" or "active but unregenerated" (skip visiting others)
			if ((pFeatStatus != PRO_FEAT_ACTIVE) && (pFeatStatus != PRO_FEAT_UNREGENERATED)){
				return iStatus;					//	Skip feature
			}

			//	Filter for skeletons
			pErr = ProAsmcompMdlGet(pFeature, &pModel);
				if (pErr != PRO_TK_NO_ERROR) { return PRO_TK_CANT_ACCESS; }
			pErr = ProMdlIsSkeleton(pModel, &bIsSkeleton);
				if (pErr != PRO_TK_NO_ERROR) { return PRO_TK_CANT_ACCESS; }
			if (bIsSkeleton == PRO_B_TRUE){
				iStatus	= PRO_TK_NO_ERROR;			//	Allow visiting this feature
			}
		}
	}

	return iStatus;
}
AndrewK
Community Manager
(To:SS4598)

Hi @SS4598,


I wanted to follow up with you on your post to see if your question has been answered. If so, please mark the appropriate reply as the Accepted Solution for the benefit of other members who may have the same question.

Of course, if you have more to share on your issue, please let the Community know. 

 

Thanks!

Announcements


Top Tags