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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How to undo recent actions?

VladiSlav
17-Peridot

How to undo recent actions?

Hello, please tell me how you can undo the last actions with Windchill files? How to restore a previous version if I didn't do a backup. I made a lot of changes in 2 days, and now I want to restore the contents of the files.

ACCEPTED SOLUTION

Accepted Solutions
mmeadows-3
15-Moonstone
(To:VladiSlav)

There is no undo button for properties changes.  Changes can be reversed but it depends entirely on what was set and how.

The mapcredentials property is a multi-value property which means the first value is defined using the xconfmanager -s (set) option and additional values are defined using the xconfmanager --add option.  If you run the set option again, it wipes out all defined values.  There should be at least two and usually three defined values for mapcredentials.admin.adapters.

To undo this, go to the last backup of site.xconf that included all the previously defined values.  When we run xconfmanager, it creates a backup of site.xconf before making the changes.  Backups are in: %wt_home%\.xconf-backup\site.###.xconf.  Start with the latest and work backwards until you find the previously defined values.

Note: There are backups of the mapCredentials.txt file too in: %wt_home%\codebase\WEB-INF\.xconf-backup\mapCredentials.###.txt.  However, the latest backup of this file does not include the last set value of the property.  Since you overwrote the property, the backup file may include all previously set values.

Define the new xconfmanager command.  We can set multiple properties at once as long as they are going to the same properties file.  For example:

xconfmanager -s mapcredentials.admin.adapters="com.company.Ldap^cn=Manager^WDS_Password" --add mapcredentials.admin.adapters="com.company.EnterpriseLdap^cn=Manager&WDS_Password" --add mapcredentials.admin.adapters="com.company.testadapter^username^password" -t codebase/WEB-INF/mapCredentials.txt -p

Always set the value and then add to it.  This way, we are guaranteed to always set it fresh, wiping out any old, undesired values.  In this case, we can't just restore the backup copy of the site.xconf because the passwords for the adapters are overwritten when we run xconfmanager again.

This could be executed as three different commands (one -s and two --add) but in this case I like it all as one to ensure I don't miss a setting.  If you discover your adapter isn't necessary, you can run the command above again without defining it or use the --remove option to remove just your adapter.

View solution in original post

4 REPLIES 4
BenLoosli
23-Emerald II
(To:VladiSlav)

What kind of changes and to what kind of objects?

Every check-in to Windchill creates a new iteration. With the right permissions, you can delete the latest iteration to get back to an older one. You can also open an older one and save it as the latest, which is cleaner and easier.

If these are documents, you only have to deal with one object.

If these are Creo drawings/assemblies/parts, the issue becomes a little messier as deleting an iteration must be done in a controlled method since there are many dependencies between the objects. In this case, the save an older iteration as the latest my be the best method. You will need to control what parts are in your workspace before loading in any assemblies and drawings.

 

 

in a Windchill Shell, I entered the command: D:\ptc\Windchill_11.1\Windchill>xconfmanager -p -s "mapcredentials.admin.adapters=testadapter^userpass^userpass -t "codebase/WEB-INF/mapCredentials.txt". Now I try to cancel this command
mmeadows-3
15-Moonstone
(To:VladiSlav)

There is no undo button for properties changes.  Changes can be reversed but it depends entirely on what was set and how.

The mapcredentials property is a multi-value property which means the first value is defined using the xconfmanager -s (set) option and additional values are defined using the xconfmanager --add option.  If you run the set option again, it wipes out all defined values.  There should be at least two and usually three defined values for mapcredentials.admin.adapters.

To undo this, go to the last backup of site.xconf that included all the previously defined values.  When we run xconfmanager, it creates a backup of site.xconf before making the changes.  Backups are in: %wt_home%\.xconf-backup\site.###.xconf.  Start with the latest and work backwards until you find the previously defined values.

Note: There are backups of the mapCredentials.txt file too in: %wt_home%\codebase\WEB-INF\.xconf-backup\mapCredentials.###.txt.  However, the latest backup of this file does not include the last set value of the property.  Since you overwrote the property, the backup file may include all previously set values.

Define the new xconfmanager command.  We can set multiple properties at once as long as they are going to the same properties file.  For example:

xconfmanager -s mapcredentials.admin.adapters="com.company.Ldap^cn=Manager^WDS_Password" --add mapcredentials.admin.adapters="com.company.EnterpriseLdap^cn=Manager&WDS_Password" --add mapcredentials.admin.adapters="com.company.testadapter^username^password" -t codebase/WEB-INF/mapCredentials.txt -p

Always set the value and then add to it.  This way, we are guaranteed to always set it fresh, wiping out any old, undesired values.  In this case, we can't just restore the backup copy of the site.xconf because the passwords for the adapters are overwritten when we run xconfmanager again.

This could be executed as three different commands (one -s and two --add) but in this case I like it all as one to ensure I don't miss a setting.  If you discover your adapter isn't necessary, you can run the command above again without defining it or use the --remove option to remove just your adapter.

mmeadows-3thank you very much for your answer, in my case I ran the same command again, but with the values that were before

Announcements

Top Tags