Rename ElementDef
In a structured document, is there a way to remane an ElementDef. I want to search for some specific names and rename them.
Example code:
var doc = app.ActiveDoc
var elem = doc.MainFlowInDoc.HighestLevelElement;
if (elem.ElementDef.Name == "some_string"){
//Change the name of the ElementDef here
}
I am assuming I need to use the SetProps function, something like this.
var props = elem.ElementDEf.GetProps();
var i = GetPropIndex(props, /*Constants.something_to_get_the_name*/ ) //need help here I think.
props.propVal = "some_new_string"
elem.ElementDEf.SetProps(props)
Is it possible to do this?
Thanks
Ethan
