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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. 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
Announcements

Top Tags