Hi,
I use C# on Microstation Connect Edition Update 3 and SDK 3.
How do you get vertices of an elements?
Before I used to get lineElem.GetVertices or shapeElem.GetVertices very easily.
Unfortunately, I couldnt find it in DgnPlatformNet.Chm and I dont know how to solve such problems which is not in help file.
Regards,
Olcay Ebcin
Hi Olcay,
Unknown said:Unfortunately, I couldnt find it in DgnPlatformNet.Chm
DgnPlatformNet is designed in very different way comparing to VBA style used in V8i. For the first sight it often seems unclear and not straightforward, but the access to elements is better formalized in my opinion ... but it's just very different ;-)
Unknown said:I dont know how to solve such problems which is not in help file.
Unfortunately DgnPlatformNet documentation is not complete, so the fastest way is to ask here and to hope somebody more experienced with CE NET API will now an answer (Paul, Maury...). I also recommend to use Object Browser or some decompiler to check what is inside assemblies that form NET API in CONNECT Edition and to become more familiar with existing classes.
Unknown said:How do you get vertices of an elements?
I have not working code available now, but based on past discussions in Programming Forum I guess it should be something like this:
Element el; CurveVector cVector; cVector = CurvePathQuery.ElementToCurveVector(el); CurvePrimitive cPrimitive = cVector.GetPrimitive(0); List<DPoint3d> vertices = new List<DPoint3d>(); cPrimitive.TryGetLineString(vertices);
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Unknown said:I guess, Until dgnPlatformNet Documentation is completed I will carry on asking in Programming Forum.
I guess it will be useful and worthy even after it will happen. One thing is to have completed documentation, but there are more topics to share and discuss: best practices, standardized code snippets, tips & trics etc. ;-)