AnsweredAssumed Answered

How to set vertical unit on the feature class

Question asked by shchau on Jun 15, 2018

I have created a PolylineZ feature class, but I don't know how to set the Z unit.

I added this PolylineZ feature class to my map, and when I look at the layer's properties, the source has "vertical units" of "foot_us."  How do I set this attribute when I create the feature class?

 


I had tried setting the layer's Z unit programmatically when I create the layer from this feature class, but it didn't seem to do anything.  Here's the code I have:

var layerProps = newLayer.GetDefinition().Layer3DProperties;
if (layerProps != null)
{

   Unit verticalUnit = ...// retrieve the Z unit (will be feet)
   if (verticalUnit != null)
   {
       layerProps.VerticalUnit = verticalUnit;
       newLayer.GetDefinition().Layer3DProperties = layerProps;
   }
}

Outcomes