- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Remove color attribute from entity
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-24-2011 02:48 PM
Hi,
Is there a way to remove a color attribute from an entity? Thank you.
Regards,
Raymond
Re: Remove color attribute from entity
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-25-2011 03:15 PM
In Scheme you can do this:
(entity:lose-attribs ent "rgb_color-st-attrib")
The important part of the CPP code for this is defined in SPAScmExt\kern_scm.m\src\ent_scm.cpp:
ENTITY *pEntity = get_Scm_Entity(argv[0]);
constchar* pcEntityType = (argc > 1) ? get_Scm_String(argv[1]) : NULL;
// Translate save name to parameters for the search routine.intent_type = -1, ent_level = -1;
if(pcEntityType != NULL)
{
find_entity_code_and_level(pcEntityType, ent_type, ent_level);
}
ENTITY_LIST ents;
ents.add( pEntity );
for (inti=0; ; ++i)
{
ENTITY* this_ent = ents[i];
if(this_ent==NULL)
break;
this_ent->copy_scan(ents);
}
API_BEGIN
ents.init();
for(pEntity = ents.next(); pEntity; pEntity = ents.next() )
{
if(is_ATTRIB(pEntity))
{
if(pcEntityType == NULL || pEntity->identity(ent_level) == ent_type)
{
pEntity->lose();
}
}
}
API_END

