I'm not sure whether it was part of the "kitchen", but at a previous company, there was a cool script that allowed you to save a view as a DXL script.
Running that script in a module would then create that view.
It was really useful for deploying views in lots of modules.
Has anyone got that script and is willing to share it?
This topic has been locked.
5 replies Latest Post - 2012-12-07T00:28:44Z by SystemAdmin
Pinned topic "Save View As DXL" script
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-12-07T00:28:44Z at 2012-12-07T00:28:44Z by SystemAdmin
Re: "Save View As DXL" script2012-12-04T01:39:38Z in response to SystemAdminA Kitchen script to save a View in DXL did exist. Just be aware that it has problems with columns that use DXL Layout (doesn't apply escape characters where needed) and it assumes that any underlying column attributes already exist in the target module.
The kitchen script declares a number of include files. The dxl file that it produces also declares some include files. I have bundled up the Main DXL file and INC files in the attached zip file but you will need to alter the declared paths to the INC files to suit.
Because this is being used outside of the Kitchen script environment, there could be some other dependencies beyond the INC files, such as a couple of bitmap icons which might raise a warning prompt but I don't it think will stop it from working. See how you go.
Re: "Save View As DXL" script2012-12-04T12:27:19Z in response to SystemAdminThanks for the quick reply Paul. That's exactly the script I was after.
Apart from the bitmap dependencies you mentioned, and find.inc not being able to resolve the function "lexicalNumber" (which I hacked out), it's working fine.
I remember making some modifications, to:
- keep the view names as the original, rather than "View 'viewName'"
- generate DXL that did not require user intervention
- ensure all view settings were copied across
I hope to post back a self-contained version of the DXL when its ready.
OurGuest 270002SVSH163 PostsACCEPTED ANSWER
Re: "Save View As DXL" script2012-12-06T17:58:58Z in response to SystemAdminAssuming you are working with one DOORS database, there is no reason to wait.
CopyView is contained within the kitchen located here: https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14224509�
Re: "Save View As DXL" script2012-12-07T00:28:44Z in response to OurGuestI have discovered an alternative in my library of DXL stuff to the Kitchen Copy Views scripts - the attached script will run stand-alone, it copies DXL layout columns which was a problem as I recall for the Kitchen version, you need to make sure that the target modules have the attributes needed for the View columns, all credit goes to David Pechacek who shared this out some time ago