Hi everybody ,
Anybody Knows another way to descompose in points a Element ??? , actually I'm using this :
Dim ee As ElementEnumerator Set ee = ActiveModelReference.Scan(esc) Do While ee.MoveNext Set elementFence = ee.Current vertexArrayFence = elementFence.ConstructVertexList(0.1) But I see that the function ConstructVertexList is extremely low , any idea ???Thanks !!!
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Unknown said:I'm using this function in maps in order of 300.000 elements
It seems to be a candidate for native code, but not necesarilly.
Unknown said: in this case , I need it for lines and linestring , because I have to do it woith VBA.
If you work with line and line strings, your code is wrong: The first step is always to apply a "maximum filter" and to process only real candidates, not all elements. Any extra element processed adds own extra steps, which can be acceptable small cost in native code but can be huge in VBA.
Unknown said: for a functions for every element type
If working with line and line strings only, it can be something like this (not tested code):
Dim esc As New ElementScanCriteria esc.ExcludeAllTypes esc.IncludeType msdElementTypeLine esc.IncludeType msdElementTypeLineString Dim ee As ElementEnumerator Set ee = ActiveModelReference.Scan(esc) Dim vertices() As Point3d Do While ee.MoveNext vertices = ee.Current.AsLineElement.GetVertices ProcessVerticesSub vertices Loop
With regards,
Jan
Answer Verified By: Xavi García Maranges