Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1677

Re: Export coordinates from elements (cells)

$
0
0

Hi Raphael,

I wired the enumerator that is running through your cells...

Hope it helps.

Now  you should provide a clever algorithm to get your column/row from the cell origin?

Public Sub WriteOutCellsInGrid()

   Dim enu As ElementEnumerator

   Dim sc As ElementScanCriteria

   Dim el As Element

   Dim p As Point3d

   Set sc = New ElementScanCriteria

   sc.ExcludeAllTypes

   sc.IncludeType msdElementTypeCellHeader

   Set enu = ActiveModelReference.Scan(sc)

   Do While enu.MoveNext

       Set el = enu.Current

       'THIS SHOULD BE ALWAYS A CELL

       p = el.AsCellElement.Origin

       Debug.Print el.AsCellElement.Name + "   KOORD: X:" + CStr(p.X) + "  Y:" + CStr(p.Y)

   Loop

End Sub


Viewing all articles
Browse latest Browse all 1677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>