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

Best Practices for Creo Drawing Formats (.FRM) in Windchill

lhoogeveen
17-Peridot

Best Practices for Creo Drawing Formats (.FRM) in Windchill

We have a headache around duplicate and unapproved Creo drawing formats getting checked into Windchill. Any ideas on how to make formats easier to manage?

  • Users like to do a Workspace Save As and it's relatively easy to duplicate the formats. Once checked in, the duplicate formats are a lot of work to remove.
  • Can formats be excepted from the Windchill Save As menu?
  • Can creation of new formats in Windchill be restricted to an set of users?
  • Easy way to replace the duplicate formats in Creo drawings? Other than manually replacing in every drawing.
  • There's a ModelCheck for FORMAT_NAME to create a warning/error if not using an approved format but it doesn't currently allow no format as an option.
10 REPLIES 10
BenLoosli
23-Emerald II
(To:lhoogeveen)

Training. Training. Training!

The users need to be taught that  formats belong to the system,  not for them to play with and rename. I put our formats in a Windchill library and that makes the files read-only when loaded into a user workspace.

No easy way to fix. Have any user that puts a bad format on a drawing fix his own mistake.

With ModelCheck, turn on DO NOT check-in with errors and have the system check for valid format names. Any other format name would be an error and prevent check-in until fixed.

Make engineering management aware that the users under them are NOT following established guidelines and procedures required for Windchill to function properly. Write out the  things that you do not want the users to do, have engineering management sign off on the document and distribute to all users with the understanding that infractions will be reported to their managers.

Maybe a little tough at first, but they will learn.

 

Maybe give out a 'broken-finger award' to the user with the most issues during a week or month. I use a picture of a broken finger for my award to a user who does something dumb. The last one I gave out was for going on vacation with Creo open and files not checked in when we went on a 2 week vacation.

I created a product idea for Better Creo Drawing Format (.FRM) Administration in Windchill.

 

@BenLoosli  Training can only can only go so far with 200-300 Creo/Windchill users all over the world. Our Creo formats are also in a Library where only approved people can modify them. However, this doesn't exclude the formats from the Windchill Save As commands which basically begs people to make accidental copies for the formats by including the formats by default.

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.

 

Your welcome

@BjoernRueegg Brilliant! That is exactly the solution the PTC should implement for everyone. Companies do not want to copy the Formats by default - they should be excluded by default.

TomU
23-Emerald IV
(To:BjoernRueegg)

I just tried this on a Windchill 11.0 M030 CPS16 test system.  The one thing I noticed is that even though the formats are excluded by default, they can still be included (overridden) with the 'Include selected objects' button.  Is there any way to prevent that as well?

 

TomU_0-1584551809165.png

 

BjoernRueegg
17-Peridot
(To:TomU)

The problem is only, if an administrator wants to do a save as from the drawing frame, then he also can't enable it.

 

If you would like to hide the rows you need to exchange the following line (twice)

 

//item.setExcluded(true, true);
item.setHidden(true, true);

Hiding the formats from Windchill Save As is probably a good idea. If admins want to do a Save As of the formats, they can do so from Creo. This will be done very infrequently so I think that's a fair trade off.

 

I could see wanting to setup something similar for the Move, Rename, Set State, etc. commands (exclude or hide by default). Is the code easy to adapt?

I'm not sure, at the moment I have just modified the save as javascript. The challenge is to figure out the right place to add the code, since all actions have other method names.

 

Set state shouldn't be a problem. Move the frames to a library where the user just has read permission.

HE_9849681
4-Participant
(To:TomU)

sir same problem for me also please explain me 

 

i already saved the format (.frm) in windchil it is also released in state in windchil,,,after that i create one new drawing (.drw) .but when i try to save that drawing the .frm also came like above picture....

 

is there any possile to break dependency or copy the(.frm) after paste into drawing(.drw)..

 

please anyone tell me

 

Zoltán
13-Aquamarine
(To:HE_9849681)

Hi,

 

Have you tried creating a Library for the Formats, and using that location as base for the format for the drawing? Then the format already lives in PDMLink, and won't be picked for check in.

Announcements


Top Tags