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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

To Fetch PTC Server system attributes in XML

rr-3
1-Newbie

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