Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi all,
I'd like to get the local path of a file (a graphic entity) added to the CMS. The Java technical documentation states that CMSSessionPutFile / CMSSessionPostPutFile events are here for that. According to the code above, these events are properly raised but the localPath variable is always empty :
Application.addEventListener("CMSSessionPutFile", new EventListener() {
@Override
public void handleEvent(Event evt) {
Application.print("CMSSessionPutFile\n");
CMSSessionFileEvent event = (CMSSessionFileEvent) evt;
EventTarget currentTarget = event.getCurrentTarget();
EventTarget target = event.getTarget();
short errorCode = event.getErrorCode();
String errorMessage = event.getErrorMessage();
String folderLogicalId = event.getFolderLogicalId();
String localPath = event.getLocalPath();
String logicalId = event.getLogicalId();
String notation = event.getNotation();
String objectName = event.getObjectName();
String result = event.getResult();
Application.print(errorCode + "_" + errorMessage + "_" + folderLogicalId + "_" + localPath + "_" + logicalId + "_" + notation + "_" + objectName + "_" + result + "\n");
}
}, true);
Application.addEventListener("CMSSessionPostPutFile", new EventListener() {
@Override
public void handleEvent(Event evt) {
Application.print("CMSSessionPostPutFile\n");
CMSSessionFileEvent event = (CMSSessionFileEvent) evt;
EventTarget currentTarget = event.getCurrentTarget();
EventTarget target = event.getTarget();
short errorCode = event.getErrorCode();
String errorMessage = event.getErrorMessage();
String folderLogicalId = event.getFolderLogicalId();
String localPath = event.getLocalPath();
String logicalId = event.getLogicalId();
String notation = event.getNotation();
String objectName = event.getObjectName();
String result = event.getResult();
Application.print(errorCode + "_" + errorMessage + "_" + folderLogicalId + "_" + localPath + "_" + logicalId + "_" + notation + "_" + objectName + "_" + result + "\n");
}
}, true);
You'll find attached all variable values for both events.
My question is: how is the localPath variable completed?
Thanks for your time.