Packager
Used to manage GenerativeComponents Package files (*.gcp) both in active design file and in the GC environment. The package framework provides a general mechanism for supporting all manner of current, new, and future technologies.
A package file is an independent file that contains the definitions of one or more packageable items. Each package file is self-contained, in that it includes everything needed to reconstruct its contents within any GenerativeComponents session on any computer. A package files can serve as a way for you to create and distribute content that's dedicated to a particular project, team, organization, or discipline.
- Read a package file.
- Write a package file from all the current-installed packageable items, or a user-selected subset.
- Indicate that certain (or all) packageable items should be re-installed automatically into each subsequent session of GenerativeComponents.
- Import a GNT library file from an earlier version of GenerativeComponents.
- Uninstall (delete) one or more packageable items.
Packager Internal Workings
The Packager replaces the previous GNT Manager tool.
GenerativeComponents's folder "GNT Libraries" has been replaced with the "GC Packages" folder. If the GC Packages folder doesn't exist, GenerativeComponents creates it using the same mechanism previously used to create the GNT Libraries folder.
To support the Packager, GenerativeComponents transaction files (*.gct) have additional XML code at the end. The code defines installed packageable items when the *.gct file was last saved.
The following is the ending of a typical *.gct file. Everything starting from the line ===== XML ===== is added.
transaction 26 stateChange 'Add color01, expression01; change line01, point01' { gcModel { node User.Objects.expression01 Bentley.GC.NodeTypes.Expression { Technique = 'Default'; Value = 7; IsValueDisplayed = true; GraphLocation = {8.0, -38.0}; } node User.Objects.point01 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; XTranslation = expression01; } node User.Objects.color01 Bentley.GC.NodeTypes.Color { Technique = 'BySingleColor'; Value = color(r=212,g=44,b=44); GraphLocation = {76.0, 241.0}; } node User.Objects.line01 Bentley.GC.NodeTypes.Line { Technique = 'ByPoints'; Color = color01; } } } transaction 27 stateChange 'Change functionCall01' { gcModel { node User.Objects.functionCall01 Bentley.GC.NodeTypes.FunctionCall { Technique = 'Default'; inArg = 5; refArg = 7; GraphLocation = {1072.64, 17.04}; } } } ========== XML ================================================================ <?xml version="1.0" encoding="utf-8"?> <GCPackage xmlns="clr-namespace:Bentley.GenerativeComponents.Packager.Xaml.v1;assembly=Bentley.GenerativeComponents.Packager" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Gnt Author="Jeff Brown" CreationTimeUniversal="2019-10-17T20:33:18.7485466Z" FullName="User.Fred"> <Gnt.NodeUpdates> <GntNodeUpdate NodeName="line01"> <GntNodeUpdate.Properties> <GntProperty ExpressionScript="point01" Name="StartPoint" /> <GntProperty ExpressionScript="point02" Name="EndPoint" /> </GntNodeUpdate.Properties> </GntNodeUpdate> </Gnt.NodeUpdates> <Gnt.Nodes> <GntNode Flags="DgnModelProvider, Feature, InputProperty, Replicatable" GCTypeFullName="Bentley.GC.NodeTypes.IPoint" Name="point01" TechniqueName="ByCartesianCoordinates" /> <GntNode Flags="Feature, InputProperty, Replicatable" GCTypeFullName="Bentley.GC.NodeTypes.IPoint" Name="point02" TechniqueName="ByCartesianCoordinates" /> <GntNode Flags="Dynamic, Feature, OutputProperty" GCTypeFullName="Bentley.GC.NodeTypes.Line" ListRank="1" Name="line01" TechniqueName="ByPoints"> <GntNode.GeneralProperties> <GntProperty ExpressionScript="Colors.Blue" Name="Color" /> </GntNode.GeneralProperties> </GntNode> </Gnt.Nodes> </Gnt> <Function Author="Jeff Brown" CreationTimeUniversal="2019-10-17T20:31:44.376756Z" FullName="User.Objects.Function1"> <x:String>string Function1(int inArg, ref int refArg, out int outArg)</x:String> <x:String>{</x:String> <x:String xml:space="preserve"> outArg = inArg * ++refArg;</x:String> <x:String xml:space="preserve"> return 'test';</x:String> <x:String>}</x:String> </Function> </GCPackage>