- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
R20 asmi_compo nent_find_ name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-14-2009 11:48 PM
Hi,
I read a CATIA V5 assembly file using InterOP/ACIS R20 but I didn't get name of sub-components by asmi_component_find_name().
In R19, I got name of components by the same api function.
Let me know....
Re: R20 asmi_compo nent_find_ name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-15-2009 01:25 AM
Hello pjp,
You can refer to
GetComponentName function in AcisAsmMiImport.cpp from AcisAsmMiImport sample.
void
GetComponentName( component_handle* ipComponent, wchar_t
opCompName[])
{
bool got = false
;
entity_handle* pNameProp = NULL;
outcome out = asmi_component_find_property( ipComponent, ATTRIB_GEN_NAME_TYPE, pNameProp);
while
( out.ok() && NULL != pNameProp)
{
ATTRIB_GEN_NAME* pNameAttribEnt = ( ATTRIB_GEN_NAME*)( pNameProp->entity_ptr());
const char
* pAttribName = pNameAttribEnt->name();
if( 0 == strcmp( "ATTRIB_XACIS_NAME"
, pAttribName))
{
if
( is_ATTRIB_GEN_WSTRING( pNameAttribEnt))
{
ATTRIB_GEN_WSTRING* pWCharLabel = ( ATTRIB_GEN_WSTRING*)pNameAttribEnt;
const wchar_t
* pCompName = pWCharLabel->value();
wcscpy( opCompName, pCompName);
got =
true
;
}
else if
( is_ATTRIB_GEN_STRING( pNameAttribEnt))
{
ATTRIB_GEN_STRING* pCharLabel = ( ATTRIB_GEN_STRING*)pNameAttribEnt;
const char
* pCompName = pCharLabel->value();
char
compName[1024];
strcpy( compName, pCompName);
CopyFromMBCS( compName, opCompName);
got =
true
;
}
}
if
( got)
{
break
;
}
else
{
entity_handle* pNextNameProp = NULL;
out = asmi_component_find_next_property( ipComponent, ATTRIB_GEN_NAME_TYPE, pNameProp, pNextNameProp);
pNameProp = pNextNameProp;
}
}
}
(Spatial InterOp Developer)
Re: R20 asmi_compo nent_find_ name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-04-2009 03:09 AM
Hello Kedar Vaishampayan,
I used GetComponentName function, but that unusually worked.
Sometimes, the function returns the parent name of a component.
I want to get the target component's name.
By the way, why does asmi_component_find_name function not work in ACIS R20?
Re: R20 asmi_compo nent_find_ name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-04-2009 03:28 AM
Hello pjp,
It should have worked! Please submit an issue if you are seeing any incorrect or unexpectexd results.
We changed the way InterOp saves the names of assembly components in asat in R20. InterOp now saves names using ATTRIB_XACIS_NAME for consistency with BRep (sat) entities.
(Spatial InterOp Developer)

