AnsweredAssumed Answered

IBufferConstruction in PRO Sdk

Question asked by mjk5000 on May 7, 2018
Latest reply on May 10, 2018 by ALocke-esristaff

I am wondering if there is an equivalent to IBufferConstruction in the PRO SDK.  It is necessary that for a given line for one of my tools, that the user be allowed to buffer left/right/full and to have round/flat endpoints.  I am essentially getting drawing line from user and then prompting them with how they want it buffered?

 

Does this exist in PRO like in ArcObjects Below? 

 

//Setup the Buffer Constructor and its Properties
            IBufferConstruction BufferConstructor = new BufferConstruction();
            try
            {
                //Buffer Properties
                IBufferConstructionProperties bcProps = BufferConstructor as IBufferConstructionProperties2;
                bcProps.EndOption = esriBufferConstructionEndEnum.esriBufferRound;
                bcProps.SideOption = esriBufferConstructionSideEnum.esriBufferFull;

                if (string.Equals(endType, "Square", StringComparison.OrdinalIgnoreCase))
                {
                    bcProps.EndOption = esriBufferConstructionEndEnum.esriBufferFlat;
                }

                if (string.Equals(sideType, "1-Sided", StringComparison.OrdinalIgnoreCase))
                {
                    bcProps.SideOption = esriBufferConstructionSideEnum.esriBufferRight;
                    if (string.Equals(directionType, "Left", StringComparison.OrdinalIgnoreCase))
                    {
                        bcProps.SideOption = esriBufferConstructionSideEnum.esriBufferLeft;
                    }
                }

                //Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");
                //System.Object obj = Activator.CreateInstance(factoryType);
                //ISpatialReferenceFactory3 spatialReferenceFactory = obj as ISpatialReferenceFactory3;
                //IUnit meterUnit = spatialReferenceFactory.CreateUnit((int)esriSRUnitType.esriSRUnit_Meter);
                //bcProps.Unit = meterUnit;
            }

Outcomes