Hi Hardy,
Your guess is correct that the CAD labels are drawn as polygons in CADFeatureLayer. We are using Microsoft media library to get the label shape, some codes like the below:
FormattedText formattedText = new FormattedText(textString, CultureInfo.GetCultureInfo(“en-us”), FlowDirection.LeftToRight, new Typeface(fontStyle.TypeFace), fontSize, System.Windows.Media.Brushes.Black);
…
Geometry geometry = formattedText.BuildGeometry(position);
pathGeometry = geometry.GetOutlinedPathGeometry();
Basically, we can treat the label as a vector shape which means the shape should be not distortion. You can see our
wiki sample on CAD, their labels are clear as well. But from your screenshot, we have no idea why the labels are indistinct. So, would you mind to send us your .dwg file so that we can see what’s the exact reason?
Also, you suggest to give a way to set a font or rotate the text label. Based on our current structure, like the above codes show, we have converted the labels to polygon with the specified font size or rotation, both font size and rotation are calculated based on the .dwg file. So, it is almost impossible to provide any APIs to change that, I think this should be one of the part of the CAD file. Another reason is the CadFeatureLayer will get all the features, which also includes the labels polygons feature, so, it is also hard to split the labels features from the mixed features.
As for the question: How to retrieve the CAD-Attributes? Please forgive my poor understanding on CAD but I am a bit confusion on what’s the purpose with them? Do you want to use them to render the layer or others? as I know, we are using their attributions as styles to render all the shapes. That’s why we can give a value “EmbeddedStyling” for the StylingType property of the layer.
For your projection issue, as I know this layer supports the projection. I try to add the projection for the layer and get its boundingbox, then I can get a projected boundingbox rather than the original one. But you mentioned you have the issue on doing the “snap” and “select”, so I am guessing what my test is not the same like yours. So, would you mind to give us more details on your scenarios or any codes so that we can see the differences?
Btw, in case you are doing the snap and then save it back to cad file, currently, our CADFeatureLayer don’t support the “write” feature but only read it out on the map.
Hope it helps and let me know if you have any questions.
Thanks,
Troy