I'm trying to to to use Mesh.CreateCylinderParameters method.I would like to use imperial units in my drawing.Here it says that one needs to change units to do so:https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#CreateCylinderParametersI assume I'd need to load esri/core/units and then adjust the property values as shown here:https://developers.arcgis.com/javascript/latest/api-reference/esri-core-units.htmlHere is where I get confused. There is no example as to how this is done properly. Here is what I did but no luck. Drawings did not change. Please advise.
units.MeasurementSystem = "imperial"units.LengthUnit = "us-feet"
Actually, esri/core/units is not involved when using the createCylinder method. It is also not possible to specify a system of units (e.g. "imperial" or "metric") with this method. Instead, your actual units must be known beforehand, and the value must be one of the constants defined for LengthUnit. An example is below:
var cylinder = Mesh.createCylinder(point, { width: 5, depth: 4, height: 3, unit: "feet" });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.