Home
Reply
Regular Contributor
Posts: 41
0

How can I get model names for all parts of spatial assembly?

Hello,

I have found that example AcisAsmMiImport  does not print model names for the leaf parts of the assembly tree.

 

I try to use functions

            entity_handle* pInst = components[i];
            getInstanceName(ipAsmModel, pInst, labelInst);

            asm_model* pAsmInstModel = NULL;
            asmi_model_ref_get_model(pInst, pAsmInstModel);
            getModelName(pAsmInstModel, labelPart);
void getModelName( asm_model* ipAsmModel, wchar_t opModelName[])
{
	component_handle* pDefHandle = NULL;
	API_MODEL_BEGIN( ipAsmModel)
		asmi_model_get_component_handle( ipAsmModel, pDefHandle);
		GetComponentName( pDefHandle, opModelName);
	API_MODEL_END( ASM_NO_CHANGE);
}

Function getInstanceName return valid name og instance.

Function getModelName return valid names only for the not leaf models.

 

How can I get model names for all parts of assembly?