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.

saveas - Collected Object exclude

Amirtharaj_K
15-Moonstone

saveas - Collected Object exclude

Hi Guys

I found this our PTC Community can we do the same thing for the library component?

 

Regards,

AJ

 

PTC Community 

I'm willing to share a small secret  The following solution is not really nice, but it works.

Put following file to the WTSafeArea 

%WT_HOME%\codebase\templates\uwgm\cadx\saveas\saveas.js

 

Afterwards open it, search the two methods and add following code:

function updateItemsWithInitialValue(tableid, columnid, rowsToUseFunc, setterFunc, setterArgObj) {
    var itemsArray = getRowDataForJSTable(tableid);
    var l = itemsArray.length;

    for ( var i = 0; i < l; i++) {
        var item = itemsArray[i];
        var FieldValue = item.getAttr('oirConstraints');
        var isNamePreGenerated = false;
        if (FieldValue & NAME_PRE_GENERATED_ATTR)
            isNamePreGenerated = true;

        // 14219836: To avoid overwriting the name, org, number when pregenerated constraint is set.
        if (!(isNamePreGenerated && columnid == newNameColumn)) {
            if (rowsToUseFunc(item))
                setterFunc(item, columnid, setterArgObj);
        }
		//----custom-code----
		var FieldValue2 = item.getAttr('objCadModelName');
		if(FieldValue2.endsWith('.frm')){
			item.setExcluded(true, true);
		}
		//----custom-code-END----
    }
}

function updateIncrementallyAddedItemsWithInitialValue(tableid, columnid, newItems, setterFunc, setterArgObj) {
    var itemsArray = newItems;
    var l = itemsArray.length;

    for ( var i = 0; i < l; i++) {
        setterFunc(itemsArray[i], columnid, setterArgObj);
		//----custom-code----
		var item = itemsArray[i];
		var FieldValue2 = item.getAttr('objCadModelName');
		if(FieldValue2.endsWith('.frm')){
			item.setExcluded(true, true);
		}
		//----custom-code-END----
    }
}

 

After that, the client browser cache needs to be deleted.

The attached movie is from Windchill 10.2, but it works also in 11.0 and 11.1.

Since the Save-As Wizard did get a small redesign in 11.2 it's possible that the code isn't working anymore.

1 REPLY 1

Hi @Amirtharaj_K

Thank you for your question. 

Your question appears to be well documented, however I'd like to recommend to bring more details and context to your initial inquiry

It also helps to have screenshot(s) to better understand what you are trying to do in your process. 

This will increase your chances to receive meaningful help from other Community members. 

Regards,
Community Moderation Team.

Announcements


Top Tags