Hii
Anyone one can help me....
How i can export MicroStation line length and coordinates from line properties geometry data to Excel.
Or full data extract into in excel from microstation element properties.
Regards,
Ankit Sharma (India)
Hello Ankit,
One question i would like to ask is whether the line is created with Generative Components? If yes then you can use the Excel Range node to export the values.
Regards,Alifur
Hello Alifur,
No, this line is created by simple tool of microstation. "By Place line or Place smartline command".
thank you for the response. looks to me a MS query. i will transfer this query to MS so that they can suggest a proper answer.
Hi Ankit,
Here is an example of how to do it in GC. If it is a line string it is a bit more work but it can be done.
transaction 1 stateChange 'Add baseCS' { gcModel { node User.Objects.baseCS Bentley.GC.NodeTypes.CoordinateSystem { Technique = 'AtDGNModelOrigin'; DGNModelName = 'Design Model'; SymbolSize = 1.0; GraphLocation = <auto> {40.0, 40.0, 0.0, 117.37}; } } } transaction 2 stateChange 'Add point1, point2' { gcModel { node User.Objects.point1 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = <free> 952.312973473704; YTranslation = <free> 1353.02218648675; ZTranslation = -100; GraphLocation = <auto> {314.0, 40.0, 0.0, 156.43}; } node User.Objects.point2 Bentley.GC.NodeTypes.Point { Technique = 'ByCartesianCoordinates'; CoordinateSystem = baseCS; XTranslation = <free> 2230.23351650732; YTranslation = <free> -115.750255321315; ZTranslation = 100; GraphLocation = <auto> {314.0, 236.43, 0.0, 156.43}; } } } transaction 3 stateChange 'Add range1' { gcModel { node User.Objects.range1 Bentley.GC.NodeTypes.Range { Technique = 'ByLowHighRangePoints'; LowPoint = point1; HighPoint = point2; GraphLocation = {609.667, 135.667}; } } } transaction 4 stateChange 'Add line1' { gcModel { node User.Objects.line1 Bentley.GC.NodeTypes.Line { Technique = 'FromElementsInRange'; ElementRange = range1; RangeAction = RangeOption.Inside; ScaleFactor = 1.0; GraphLocation = {871.0, 109.0}; } } } transaction 5 stateChange 'Add value1' { gcModel { node User.Objects.value1 Bentley.GC.NodeTypes.Value { Technique = 'Default'; Value = line1.Length; GraphLocation = {1091.0, 223.0, 0.0, 123.83}; } } } transaction 6 stateChange 'Add excelRange1' { gcModel { node User.Objects.excelRange1 Bentley.GC.NodeTypes.ExcelRange { Technique = 'WriteValue'; WorkbookFileName = '..\..\..\Temp\TreeLines.xls'; SheetName = "TreeLines"; RangeAddress = "A2:A24"; Value = value1.Value; GraphLocation = {1351.0, 88.334, 0.0, 167.743}; } } } transaction 7 stateChange 'Add value2, value3' { gcModel { node User.Objects.value2 Bentley.GC.NodeTypes.Value { Technique = 'Default'; Value = line1.StartPoint.XYZ; GraphLocation = {1061.667, 375.667}; } node User.Objects.value3 Bentley.GC.NodeTypes.Value { Technique = 'Default'; Value = line1.EndPoint.XYZ; GraphLocation = {1064.333, 525.667}; } } } transaction 8 stateChange 'Add excelRange2' { gcModel { node User.Objects.excelRange2 Bentley.GC.NodeTypes.ExcelRange { Technique = 'WriteValue'; WorkbookFileName = '..\..\..\Temp\TreeLines.xls'; SheetName = "TreeLines"; RangeAddress = "B2:D24"; Value = value2.Value; GraphLocation = {1352.56, 280.573, 0.0, 167.743}; } } } transaction 9 stateChange 'Add excelRange3' { gcModel { node User.Objects.excelRange3 Bentley.GC.NodeTypes.ExcelRange { Technique = 'WriteValue'; WorkbookFileName = '..\..\..\Temp\TreeLines.xls'; SheetName = "TreeLines"; RangeAddress = "E2:G24"; Value = value3.Value; GraphLocation = {1367.333, 492.733, 0.0, 167.743}; } } }
Example File
2273.lines.dgn
Hope that helps
Wayne