API Reference > ecschema-Metadata > Metadata > ECClass > createPrimitivePropertySync createPrimitivePropertySync MethodProtected Overloads createPrimitivePropertySync(name, primitiveType) Protected createPrimitivePropertySync(name, primitiveType) Protected createPrimitivePropertySync(name, primitiveType) createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty Parameter Type Description name string primitiveType Enumeration Returns - EnumerationProperty createPrimitivePropertySync(name, primitiveType) Creates a PrimitiveECProperty. createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class. Parameter Type Description name string The name of property to create. primitiveType PrimitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer Returns - PrimitiveProperty Defined in core/ecschema-metadata/src/Metadata/Class.ts Line 160 Last Updated: 12 June, 2024