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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Update gentext locally?

ClayHelberg
18-Opal

Update gentext locally?

Hi Adepters--



Does anyone know of a way to update the gentext just for a single
element in a document? For example, after some code makes a change to an
attribute value, I would like the gentext for the element to be updated
to reflect the change in the editor view--but I don't want to do a
global refresh for the entire document (which can take a long time) just
to pick up that one change. I'm looking for something like this, in the
case where the gentext includes some attribute value:



function update_element(oid, attrname, attrval) {

# update the OID

oid_modify_attr(oid, attrname, attrval);

# refresh the OID's gentext to pick up the change

oid_update_gentext(oid);

}



I'm trying to either discover a built-in function to do the job of
"oid_update_gentext(oid)", or write one of my own, but so far haven't
had any luck. Has anyone been able to do this? Thanks.



--Clay



Clay Helberg

Senior Consultant

TerraXML



2 REPLIES 2

Try show fullkeymap. I thought there was a alt or ctrl key command that
updated only what was visible in the Edit window. Not sure if you can
hijack that (if I'm even remembering correctly) but maybe ...

Thanks Paul, but the only entry I find there is Alt+Ctrl+g =
ShowGentext, which updates the whole document.



--C





Clay Helberg

Senior Consultant

TerraXML


Announcements

Top Tags