How to Use c_io.exe in a Batch File

Why use c_io.exe?

Using c_io.exe allows a user to do many things within a project without using the interface and is usually faster.

Using c_io.exe in a batch file means you can do many things while you are actually away from your desk or in the background. You can then add this batch file to be run by a task application during times you are away from you desk or work. This can be handy when needing to do backups of a single or many large databases.

The executable can import and export everything in a project from single items to the whole project. It can use queries or different options to whittle down the required export. So a user can export all items of a specific type or just one to several items based on a query and or other set options.

The user can use also use the import to update or create a new Project schema, items, cross references and definitions.

Import and Export can use the Format Types already saved into the database.

It can also export just a single frame from a single item into a file of the right type and print diagrams to specific print types.

How to use c_io.exe

The only real difference between using a command prompt and a batch file is the user will need to have a path for the executable. At the beginning of each command line the user will need “%CRADLEHOME%\bin\exe\windows\c_io.exe”

As in commandline code, a user will require the correct login information and the project being logged into.
-login <username>,<password>,<projectcode>

For example:

-login admin.ADMIN.demo

As long as the -login user has the correct privileges, they can use c_io.

Different Options in c_io.exe

Required options are:

-export

Export Options for c_io.exe
Export Options for c_io.exe

-import

c_io import options
Import options for c_io.exe

-getframe

Options for getframe in c_io.exe
The options for getframe in c_io.exe

-printdiag

printdiag options in c_io.exe
The printdiag options in c_io.exe

Without any of the previous options, c_io.exe will put up the Information page or an error.

Helpful other c_io options

There are several helpful options especially when using in a batch file.

-log allows a user to specify a name for a log. This is the log that will have the details of the actions performed during the  import.

-noldap allows users to bypass using LDAP when running a command line or batch file.
-errorstack option is for logging any issues with the import

 

“%CRADLEHOME%\bin\exe\windows\c_io.exe” -login admin,ADMIN,demo -export “C:\Temp\all3.exp” -type all -noldap -errorstack -log “C:\Temp\all4_log.log”
“%CRADLEHOME%\bin\exe\windows\c_io.exe” -login admin,ADMIN,demo -export “C:\Temp\pdb3.exp” -type pdb -noldap -errorstack -log “C:\Temp\pdb3_log.log”

Options not used within a batch file

A few of the options are not used in a batch file but are in a command prompt. The reason is that they are only used in a command prompt is that they show pop ups with information on them.

-verbose lets the user know that c_io.exe has finished
-ver lets the user see what the version number, date and time of the build they are using.
-help is used to see all the command line options.

Batch Files from Project Phase

Batch files can be added into the Project Phases, this is done by going to “Project Setup”, and in Options selecting “Project Phases”. Inside here if you create a new Process and change the type to command, in Command navigate to your .bat file.

A screenshot showing how to setup a phase node to run a batch file
Command phase node to run batch filesArticle Updated 04/02/2019 – Added infor on running batch file from phase sidebar

Reverse and Rewind Item Edits

What is Reverse and Rewind?

You can rewind edit histories so you can restore an item back to a state before a particular change or you can reverse a single edit in an item’s change history. This doesnt mean the feature will delete a previous change that has been made but it does mean it will add a further entry returning the the value to a previous state.

Reverse and Rewind edit history dialog
Reverse/Rewind edit histories

Reverse

Reversing an edit is an exact undo operation. It reverses the change to every attribute that was modified by the selected edit. Note that creation/deletions of xrefs cant be reversed.

For further information on reversing an edit please refer to the Reverse

Change History section of our online help.

Rewind

The Rewind operation essentially reverses all edits working backwards from the most recent back to (and including) the selected edit. Its end result is to restore the item to the state that it was in before the selected edit occurred.

For further information on rewinding edit histories please refer to the Rewind Change History section of our online help.

Results

Further Change History will be generated to show what changes were either reversed or rewound. The example below has seven change history entries. For simplicity each only modified one attribute of the item. Selecting the third entry and then either reverse or rewind will produce the two illustrated results.

Showing the different results for reversing or rewinding
Reverse or Rewind

We hope we have covered all the information that is needed to help you on your way to understanding reverse/rewind. Any more help can be found on our help page.

Article Updated 04/02/2019 –  Updated to say data will not be lost just changed to a state they were previously

Can I control the shape of a HID?

Hierarchy Diagram Output Control

Yes you can control the shape of a HID (Hierarchy Diagram). In the hid properties you can control the shape and data shown in your HID.

The cross reference links between each item control the connections shown on the HID.  The whole HID layout can be Vertical or Horizontal. The number of levels shown when first rendered (rather than dynamic click and expand) can be controlled. Whether an item is shown more than once if it has multiple cross references and general layout parameters. These are further detailed in How to Set Hierarchy Diagram Properties. Once you are happy with the layout it can be saved for use next time you need a similar pattern.

The HID properties dialog
HID Properties Dialog

Your data may produce a short wide tree or a long narrow tree. This can be difficult to see on the screen. This video shows how changing the pivot point, (the node at which the orientation changes from listing horizontally to vertically) can alter the overall display to be more usable.

How do I switch on tracing?

Switch on tracing?

Support have asked me to switch on tracing, what is it, and how do I do it?

Occasionally some customer installations don’t allow Cradle to function as required. In order to get to the bottom of this the Cradle Support Team may ask you to ‘turn on tracing’. This will give a comprehensive report of what’s happening internally in Cradle. You can then send these logs for diagnosis. This will then help us resolve your installation issue as fast and efficiently as we can.

Screen shot of Cradle Tracing configuration files
Cradle Tracing Configuration

The files

The files trace_options and trace_config control how tracing is performed. By default they are located in %CRADLEHOME%\admin\trace

trace_options

This file controls when to collect, and is used to simply switch tracing on or off. Setting CDS_USE_TRACE to true will set CDS (Cradle Database Server) tracing on. The file must be the one located on the machine running the CDS. Setting COM_USE_TRACE to true will set tracing on for any client communications. The file that you alter must be on the client machine in question.

The TRACE_CONFIG option allows you to choose which file you want to use to control the tracing, most of the time we suggest you leave it as trace_config in the same directory.

trace_config

This file controls what to collect and where to send the output. The CDS_TRACE_LEVEL and COM_TRACE_LEVEL both control how much tracing to do from LOW, through MEDIUM to HIGH. This will give basic ‘someone logged on’ reports at LOW  through to ‘this message was sent from this process to that client’ at HIGH. Support will advise which level to use, but be wary of leaving HIGH switched on for too long as it will create very large reports.

The CDS_TRACE_LOG and COM_TRACE_LOG are the location where we will write the file. The default logs folder is usually best.

When you have finished tracing don’t forget to set the values in trace_options back to false.

Discussions in Cradle

What is a Discussion?

A discussion is a hierarchy of comments for an item. The discussions in Cradle concept is similar to email threads:

  • Every item can have arbitrarily many, arbitrarily large, discussions
  • Each discussion has a hierarchy of 1 or more comments
  • Each discussion can have a decision

People can contribute to a discussion.

The discussions mechanism is very powerful. We suggest it can be used:

  • To record discussions as part of formulating requirements and other items in the database
  • As a change proposal system
  • As an informal CM system

Contents of a Discussion

A discussion contains:

  1. A decision – this applies to the entire discussion  containing a status with a value of Open, Agreed, Rejected or Suspended, a reason which is a short summary of why the decision was reached, the Cradle username of the person who recorded the decision and the date and time that the decision was made
  2. A hierarchy of comments, each comment containing a subject, a block of text that constitutes the comment, the Cradle username of the person who created the comment and the date and time that the comment was created

Creating Discussions

When created your new discussion, its decision is set to Open. You can respond to a comment by adding a new comment that is then attached to the existing comment. The same user or another user could respond to either of these comments. Therefore creating a hierarchy of comments.

Please note that comments cannot be changed once committed.

Discussions dialog showing multiple comments
Discussions Dialog in WorkBench

Querying and Reporting on Discussions

Discussions can be reported and included in documents. You can also search the database for items based on their discussions, for example:

  • Discussions where you have made a comment
  • Discussions where comments have been made in the past week
  • Where you need to make a decision on a discussion

For further information on discussions in Cradle’s WorkBench click here. If you would like to see how to work with discussions in Web Access click here.

Update frame types in your projects

Want to update your existing frame types?

Do you want to update your existing frame types which were originally supplied by 3SL or add any newly supplied frame types from 3SL, to your project?

Has your project been running for a long time, if so does your project support the latest types of files used by third party programs for example Microsoft®’s .vxdx extension files. No need to worry, 3SL supply a range of popular frame types and give you the option to easily update your existing projects to include these.

In project setup under frames types there is an update button which when clicked will bring up a “Update Frame Types” dialog that shows:

  1. All supplied frame types
  2. Whether the frame type already exists in your project
Update frames types dialog
Update frames types dialog

If you click OK the frames which are missing will be added to your project schema but your existing frames will remain untouched.

You also have the option to tick the “Overwrite existing frame types” which, as well as adding the missing frames, will update all the existing frame types with the latest settings supplied by 3SL.

For further information on frame types please refer to the Cradle online help.

 

Data Analysis – Simple View Summary

Simple Data Analysis Using View Summary Metrics

Did you know you can perform basic summary metric calculations without having a metric licence in Cradle?

Setting up a view summary metric
View Summary Metric

We all run queries to produce lists of data that match certain criteria.

In the example shown it would be possible to run the query to return only water constituents with the Group set to Harmful. Whilst this would produce useful results,  it may be more important that other items are showing too, so they can be seen in context. By setting a View Summary Metric Operation of count and Action of = with a Value of ‘Harmful’ it is possible to see a simple count of the constituents grouped as ‘Harmful’ in the sidebar.

Read our help for more information about simple Summary Metrics.