/// <summary> /// Creates the new DirectShape and adds the ExternallyTaggedBRep to it. /// </summary> /// <param name="document">A Document that will be used for the DirectShape creation.</param> /// <param name="taggedBRep">An ExternallyTaggedBRep that will be added to the created DirectShape.</param> public static DirectShape createDirectShapeWithExternallyTaggedBRep(Document document, ExternallyTaggedBRep taggedBRep) { DirectShape directShape = DirectShape.CreateElement(document, new ElementId(BuiltInCategory.OST_Stairs)); if (null == directShape) { return(null); } directShape.ApplicationId = "TestCreateExternallyTaggedBRep"; directShape.ApplicationDataId = "ExternallyTaggedBRep"; directShape.AddExternallyTaggedGeometry(taggedBRep); return(directShape); }