Skip to main content
18-Opal
January 28, 2012
Question

Update gentext locally?

  • January 28, 2012
  • 2 replies
  • 736 views
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

    1-Visitor
    January 29, 2012
    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 ...

    18-Opal
    January 29, 2012
    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