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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

To Fetch PTC server system Attributes in Image element in XML

rr-3
1-Newbie

To Fetch PTC server system Attributes in Image element in XML

twowaymetadatarule doesnt support for graphic object ,but PTC Server system attributes can be pulled into XML documents via ACL

Below is the Logic implemented:

init.acl

function initialize() {

utils::initHooks();

}

initialize();

utils.acl

initialize callbacks to handle CMS session handle

function Callbacks() {

  sess_add_callback(SIM_SESSHDL, "checkin", "utils::checkin_callback");

  sess_add_callback(SIM_SESSHDL, "create", "utils::create_callback");

}

function checkin_callback(dobj, docid, ud) {

local firstoid = dobj_first_oid(dobj);

local checkindoc = oid_doc(firstoid);

graphicnumber(checkindoc);

doc_save(checkindoc);

  return 0;

}

function create_callback( name, folder, opts, first, last, version, objtype, ud ) {

    local doc = oid_doc(first);

  graphicnumber(doc);

  doc_save(doc);

  return 0;

}

function graphicnumber(doc)

{

// write your business logic to get windchill no

something like

local number = dobj_get_attr(imagedobj,"WC_NUMBER_ATTR");

}

0 REPLIES 0
Top Tags