// Bentley GenerativeComponents Transaction File -- File structure version 1.41. (Please do not delete or change this line.) environment { GCVersion = '10.06.00.93'; MSVersion = '10.13.01.10'; MSProject = ''; MSDesignFile = 'C:\Users\Anik.Mal\Documents\Self learning\GC\Design\Experiment\Script Node selection and modification.dgn'; MSMasterUnit = {Meter, 'mm', Metric, 1.0, 1000.0}; MSSubUnit = {Meter, 'mm', Metric, 1.0, 1000.0}; MSStorageUnit = {Meter, '', Metric, 1.0, 1000.0}; MSUorsPerStorageUnit = 1000.0; } transaction 1 stateChange 'Add baseCS' { gcModel { node User.Objects.baseCS Bentley.GC.NodeTypes.CoordinateSystem { Technique = 'AtDGNModelOrigin'; DGNModelName = 'Design Model'; SymbolSize = 1; GraphLocation = {40.0, 40.0}; } } } transaction 2 stateChange 'Add point1, point2, point3, point4, point5, point6, point7, point8' { gcModel { node User.Objects.point1 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 100; YTranslation = 1479.91945343223; ZTranslation = 0.0; Origin = null; Part = {'Grids','Bubbles'}; GraphLocation = {314.0, 40.0}; } node User.Objects.point2 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 3096.83716215965; YTranslation = -523.834747805202; ZTranslation = 0.0; Part = {'Duct','Chimney-New'}; GraphLocation = {314.0, 237.87}; } node User.Objects.point3 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 100; YTranslation = 1547.46172987843; ZTranslation = 0.0; Origin = null; GraphLocation = {314.0, 435.74}; } node User.Objects.point4 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 8784.14366327406; YTranslation = -73.5529048304996; ZTranslation = 0.0; GraphLocation = {314.0, 633.61}; } node User.Objects.point5 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 10852.2551182247; YTranslation = 1907.68720425819; ZTranslation = 0.0; GraphLocation = {314.0, 831.48}; } node User.Objects.point6 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 100; YTranslation = -1581.99707879576; ZTranslation = 0.0; Origin = null; GraphLocation = {314.0, 1029.35}; } node User.Objects.point7 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 6581.15537430484; YTranslation = -2865.30033127366; ZTranslation = 0.0; GraphLocation = {314.0, 1227.22}; } node User.Objects.point8 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = 100; YTranslation = -4238.6599523465; ZTranslation = 0.0; Origin = null; GraphLocation = {314.0, 1425.09}; } } } transaction 3 stateChange 'Add NodeSelection' { gcModel { node User.Objects.NodeSelection Bentley.GC.NodeTypes.FunctionCall { Technique = 'Default'; Function = function ( ) { Node[] a = Nodes(n=> n is Point && n.X ==100); // Select all point nodes those have X coordinate value equals to 100 foreach( PointNode in a) { SetPropertyValue(PointNode, 'Part', {'Grids','Bubbles'}); //set property 'Part' equals to value {'Grids','Bubbles'} } return a; }; GraphLocation = {580.5, 77.5, 0.0, 117.163}; } } }