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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

To Fetch PTC Server system attributes in XML

rr-3
7-Bedrock

To Fetch PTC Server system attributes 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::initCMSHooks();

}

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
Announcements

Top Tags