Topic
  • 5 replies
  • Latest Post - ‏2012-12-07T00:28:44Z by SystemAdmin
SystemAdmin
SystemAdmin
3180 Posts

Pinned topic "Save View As DXL" script

‏2012-12-03T15:53:27Z |
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?
Updated on 2012-12-07T00:28:44Z at 2012-12-07T00:28:44Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: "Save View As DXL" script

    ‏2012-12-04T01:39:38Z  
    A 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.
    Paul Miller,
    Melbourne, Australia
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: "Save View As DXL" script

    ‏2012-12-04T12:27:19Z  
    A 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.
    Paul Miller,
    Melbourne, Australia
    Thanks 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.

    Cheers,
    Antonio.
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: "Save View As DXL" script

    ‏2012-12-06T17:14:30Z  
    Thanks 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.

    Cheers,
    Antonio.
    When you get that DXL script ready, I sure could use it. I need to get 3 standard views in about 70 documents and this would help tremendously! - Heidi
  • OurGuest
    OurGuest
    163 Posts

    Re: "Save View As DXL" script

    ‏2012-12-06T17:58:58Z  
    When you get that DXL script ready, I sure could use it. I need to get 3 standard views in about 70 documents and this would help tremendously! - Heidi
    Assuming 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&#14224509
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: "Save View As DXL" script

    ‏2012-12-07T00:28:44Z  
    • OurGuest
    • ‏2012-12-06T17:58:58Z
    Assuming 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&#14224509
    I 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


    Paul Miller,
    Melbourne, Australia