A common question I get asked is what is the difference between GTPack and GTExtract. Both of these utilities are delivered as part of GTData and appear on the surface to do pretty much the same thing. However, they are actually very different in how they work.
When using GTViewer, you can create an extract by rectangular fence or by polygon at any time. An extract is a self-contained file with all of the graphic data, tabular data, queries, display settings, redlines, etc. An extract is a .GTX file (see last post for more info on Extracted Files). An extract is a single file, where as non-extracted data (.GTM file and dependencies) is a collection of files.
GTExtract is virtually identical to the Extract Command found in GTViewer. The difference is that GTExtract is run from a Command Prompt and takes keyed in parameters instead of interactively selecting the area to extract. GTViewer’s Extract Command and GTExtract perform the exact same task both resulting in an Extract file (.gtx). GTExtract allows a range to be explicitly defined on the command line or the default range (-dr) can be used. The default range is the same as the Dataset’s range defined in the .GTM file.
GTPack has the same options as GTExtract and produces an Extract File (.gtx) as output; however, GTPack differs in that it does not actually perform an extract of the data. Instead, it “packs” all of the component files specified by a .GTM file into an Extract File. The result is usually the same as running GTExtract with the default range option; however, GTPack will outperform GTExtract by a significant margin because it doesn’t have to determine which elements are database records are in the extract range. GTPack always takes all of the data and packs it into the Extract file.
So, if you are going to extract your entire dataset into a single Extract File, it is more efficient to use GTPack than GTExtract. If you want to extract a specific area out of the data, you must use GTExtract.
The GTViewer SDK also includes an ActiveX control called GTExtractX that is equivalent to GTExtract only it is in the form of an ActiveX control that can be used in Visual Basic Application or any development tool that can utilize ActiveX controls.