from typing import Tuple, Set, Iterable, List


class ItemFactoryBase(APIObject):
    def NewDetailCurve(self, view: View, geometryCurve: Curve) -> DetailCurve: ...
    def NewDetailCurveArray(self, view: View, geometryCurveArray: CurveArray) -> DetailCurveArray: ...
    @overload
    def NewDimension(self, view: View, line: Line, references: ReferenceArray, dimensionType: DimensionType) -> Dimension: ...
    @overload
    def NewDimension(self, view: View, line: Line, references: ReferenceArray) -> Dimension: ...
    @overload
    def NewFamilyInstance(self, line: Line, symbol: FamilySymbol, specView: View) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, origin: XYZ, symbol: FamilySymbol, specView: View) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, reference: Reference, position: Line, symbol: FamilySymbol) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, reference: Reference, location: XYZ, referenceDirection: XYZ, symbol: FamilySymbol) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, face: Face, position: Line, symbol: FamilySymbol) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, face: Face, location: XYZ, referenceDirection: XYZ, symbol: FamilySymbol) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, location: XYZ, symbol: FamilySymbol, structuralType: StructuralType) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, location: XYZ, symbol: FamilySymbol, host: Element, structuralType: StructuralType) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, location: XYZ, symbol: FamilySymbol, referenceDirection: XYZ, host: Element, structuralType: StructuralType) -> FamilyInstance: ...
    def NewFamilyInstances2(self, dataList: List) -> ICollection: ...
    def NewGroup(self, elementIds: ICollection) -> Group: ...
    def NewModelCurve(self, geometryCurve: Curve, sketchPlane: SketchPlane) -> ModelCurve: ...
    def NewModelCurveArray(self, geometryCurveArray: CurveArray, sketchPlane: SketchPlane) -> ModelCurveArray: ...
    def NewReferencePlane(self, bubbleEnd: XYZ, freeEnd: XYZ, cutVec: XYZ, pView: View) -> ReferencePlane: ...
    def NewReferencePlane2(self, bubbleEnd: XYZ, freeEnd: XYZ, thirdPnt: XYZ, pView: View) -> ReferencePlane: ...
    def PlaceGroup(self, location: XYZ, groupType: GroupType) -> Group: ...
    def NewAlignment(self, view: View, reference1: Reference, reference2: Reference) -> Dimension: ...


class FamilyItemFactory(ItemFactoryBase):
    def NewExtrusion(self, isSolid: bool, profile: CurveArrArray, sketchPlane: SketchPlane, end: float) -> Extrusion: ...
    def NewBlend(self, isSolid: bool, profile1: CurveArray, profile2: CurveArray, sketchPlane: SketchPlane) -> Blend: ...
    def NewRevolution(self, isSolid: bool, profile: CurveArrArray, sketchPlane: SketchPlane, axis: Line, startAngle: float, endAngle: float) -> Revolution: ...
    @overload
    def NewSweep(self, isSolid: bool, path: ReferenceArray, profile: SweepProfile, profileLocationCurveIndex: int, profilePlaneLocation: ProfilePlaneLocation) -> Sweep: ...
    @overload
    def NewSweep(self, isSolid: bool, path: CurveArray, pathPlane: SketchPlane, profile: SweepProfile, profileLocationCurveIndex: int, profilePlaneLocation: ProfilePlaneLocation) -> Sweep: ...
    @overload
    def NewSweptBlend(self, isSolid: bool, path: Reference, bottomProfile: SweepProfile, topProfile: SweepProfile) -> SweptBlend: ...
    @overload
    def NewSweptBlend(self, isSolid: bool, path: Curve, pathPlane: SketchPlane, bottomProfile: SweepProfile, topProfile: SweepProfile) -> SweptBlend: ...
    def NewLoftForm(self, isSolid: bool, profiles: ReferenceArrayArray) -> Form: ...
    def NewExtrusionForm(self, isSolid: bool, profile: ReferenceArray, direction: XYZ) -> Form: ...
    def NewSweptBlendForm(self, isSolid: bool, path: ReferenceArray, profiles: ReferenceArrayArray) -> Form: ...
    def NewRevolveForms(self, isSolid: bool, profile: ReferenceArray, axis: Reference, startAngle: float, endAngle: float) -> FormArray: ...
    def NewFormByCap(self, isSolid: bool, profile: ReferenceArray) -> Form: ...
    def NewFormByThickenSingleSurface(self, isSolid: bool, singleSurfaceForm: Form, thickenDir: XYZ) -> Form: ...
    @overload
    def NewLinearDimension(self, view: View, line: Line, references: ReferenceArray, dimensionType: DimensionType) -> Dimension: ...
    @overload
    def NewLinearDimension(self, view: View, line: Line, references: ReferenceArray) -> Dimension: ...
    @overload
    def NewAngularDimension(self, view: View, arc: Arc, firstRef: Reference, secondRef: Reference, dimensionType: DimensionType) -> Dimension: ...
    @overload
    def NewAngularDimension(self, view: View, arc: Arc, firstRef: Reference, secondRef: Reference) -> Dimension: ...
    @overload
    def NewArcLengthDimension(self, view: View, arc: Arc, arcRef: Reference, firstRef: Reference, secondRef: Reference, dimensionType: DimensionType) -> Dimension: ...
    @overload
    def NewArcLengthDimension(self, view: View, arc: Arc, arcRef: Reference, firstRef: Reference, secondRef: Reference) -> Dimension: ...
    @overload
    def NewRadialDimension(self, view: View, arcRef: Reference, origin: XYZ, dimensionType: DimensionType) -> Dimension: ...
    @overload
    def NewRadialDimension(self, view: View, arcRef: Reference, origin: XYZ) -> Dimension: ...
    def NewDiameterDimension(self, view: View, arcRef: Reference, origin: XYZ) -> Dimension: ...
    def NewOpening(self, host: Element, profile: CurveArray) -> Opening: ...
    def NewModelText(self, text: str, modelTextType: ModelTextType, sketchPlane: SketchPlane, position: XYZ, horizontalAlign: HorizontalAlign, depth: float) -> ModelText: ...
    def NewControl(self, controlShape: ControlShape, view: View, origin: XYZ) -> Control: ...
    def NewSymbolicCurve(self, curve: Curve, sketchPlane: SketchPlane) -> SymbolicCurve: ...
    @overload
    def NewReferencePoint(self, A_0: PointElementReference) -> ReferencePoint: ...
    @overload
    def NewReferencePoint(self, A_0: Transform) -> ReferencePoint: ...
    @overload
    def NewReferencePoint(self, A_0: XYZ) -> ReferencePoint: ...
    def NewCurveByPoints(self, points: ReferencePointArray) -> CurveByPoints: ...


class Application(APIObject):
    def NewCategorySet(self) -> CategorySet: ...
    @overload
    def NewInstanceBinding(self, categorySet: CategorySet) -> InstanceBinding: ...
    @overload
    def NewInstanceBinding(self) -> InstanceBinding: ...
    @overload
    def NewTypeBinding(self, categorySet: CategorySet) -> TypeBinding: ...
    @overload
    def NewTypeBinding(self) -> TypeBinding: ...
    def NewElementSet(self) -> ElementSet: ...
    def NewGeometryOptions(self) -> Options: ...
    def NewCurveArray(self) -> CurveArray: ...
    def NewCurveArrArray(self) -> CurveArrArray: ...
    def NewVertexIndexPair(self, iTop: int, iBottom: int) -> VertexIndexPair: ...
    def NewVertexIndexPairArray(self) -> VertexIndexPairArray: ...
    def NewCombinableElementArray(self) -> CombinableElementArray: ...
    def NewColor(self) -> Color: ...
    def NewProjectPosition(self, ew: float, ns: float, elevation: float, angle: float) -> ProjectPosition: ...
    def NewBoundingBoxXYZ(self) -> BoundingBoxXYZ: ...
    @overload
    def NewBoundingBoxUV(self, min_u: float, min_v: float, max_u: float, max_v: float) -> BoundingBoxUV: ...
    @overload
    def NewBoundingBoxUV(self) -> BoundingBoxUV: ...
    @overload
    def NewXYZ(self, xyz: XYZ) -> XYZ: ...
    @overload
    def NewXYZ(self, x: float, y: float, z: float) -> XYZ: ...
    @overload
    def NewXYZ(self) -> XYZ: ...
    @overload
    def NewUV(self, uv: UV) -> UV: ...
    @overload
    def NewUV(self, u: float, v: float) -> UV: ...
    @overload
    def NewUV(self) -> UV: ...
    def NewDWFExportOptions(self) -> DWFExportOptions: ...
    def NewDWFXExportOptions(self) -> DWFXExportOptions: ...
    def NewFBXExportOptions(self) -> FBXExportOptions: ...
    def NewGBXMLImportOptions(self) -> GBXMLImportOptions: ...
    def NewDoubleArray(self) -> DoubleArray: ...
    def NewReferenceArray(self) -> ReferenceArray: ...
    def NewFaceArray(self) -> FaceArray: ...
    def NewIntersectionResultArray(self) -> IntersectionResultArray: ...
    def NewViewSet(self) -> ViewSet: ...
    def NewSpaceSet(self) -> SpaceSet: ...
    @overload
    def NewFamilyInstanceCreationData(self, symbol: FamilySymbol, adaptivePoints: List[XYZ]) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, face: Face, position: Line, symbol: FamilySymbol) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, face: Face, location: XYZ, referenceDirection: XYZ, symbol: FamilySymbol) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, location: XYZ, symbol: FamilySymbol, referenceDirection: XYZ, host: Element, structuralType: StructuralType) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, location: XYZ, symbol: FamilySymbol, host: Element, level: Level, structuralType: StructuralType) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, location: XYZ, symbol: FamilySymbol, host: Element, structuralType: StructuralType) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, location: XYZ, symbol: FamilySymbol, level: Level, structuralType: StructuralType) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, curve: Curve, symbol: FamilySymbol, level: Level, structuralType: StructuralType) -> FamilyInstanceCreationData: ...
    @overload
    def NewFamilyInstanceCreationData(self, location: XYZ, symbol: FamilySymbol, structuralType: StructuralType) -> FamilyInstanceCreationData: ...
    def NewAreaCreationData(self, areaView: ViewPlan, point: UV) -> AreaCreationData: ...
    def NewElementId(self) -> ElementId: ...
    def NewCurveLoopsProfile(self, curveLoops: CurveArrArray) -> CurveLoopsProfile: ...
    def NewFamilySymbolProfile(self, familySymbol: FamilySymbol) -> FamilySymbolProfile: ...
    def NewPointOnEdge(self, edgeReference: Reference, locationOnCurve: PointLocationOnCurve) -> PointOnEdge: ...
    def NewPointOnPlane(self, planeReference: Reference, position: UV, xvec: UV, offset: float) -> PointOnPlane: ...
    def NewPointOnFace(self, faceReference: Reference, uv: UV) -> PointOnFace: ...
    def NewPointOnEdgeEdgeIntersection(self, edgeReference1: Reference, edgeReference2: Reference) -> PointOnEdgeEdgeIntersection: ...
    def NewPointOnEdgeFaceIntersection(self, edgeReference: Reference, faceReference: Reference, orientWithEdge: bool) -> PointOnEdgeFaceIntersection: ...
    def NewPointRelativeToPoint(self, hostPointReference: Reference) -> PointRelativeToPoint: ...
    def NewReferencePointArray(self) -> ReferencePointArray: ...


class FamilyInstanceCreationData:
    @overload
    def __init__(self, proxy: Object): ...
    @overload
    def __init__(self, symbol: FamilySymbol, adaptivePoints: List[XYZ]): ...
    @overload
    def __init__(self, face: Face, position: Line, symbol: FamilySymbol): ...
    @overload
    def __init__(self, face: Face, location: XYZ, referenceDirection: XYZ, symbol: FamilySymbol): ...
    @overload
    def __init__(self, location: XYZ, symbol: FamilySymbol, referenceDirection: XYZ, host: Element, structuralType: StructuralType): ...
    @overload
    def __init__(self, location: XYZ, symbol: FamilySymbol, host: Element, level: Level, structuralType: StructuralType): ...
    @overload
    def __init__(self, location: XYZ, symbol: FamilySymbol, host: Element, structuralType: StructuralType): ...
    @overload
    def __init__(self, location: XYZ, symbol: FamilySymbol, level: Level, structuralType: StructuralType): ...
    @overload
    def __init__(self, curve: Curve, symbol: FamilySymbol, level: Level, structuralType: StructuralType): ...
    @overload
    def __init__(self, location: XYZ, symbol: FamilySymbol, structuralType: StructuralType): ...
    @property
    def Axis(self) -> Line: ...
    @Axis.setter
    def Axis(self, value: Line) -> None: ...
    @property
    def RotateAngle(self) -> float: ...
    @RotateAngle.setter
    def RotateAngle(self, value: float) -> None: ...


class AreaCreationData:
    @overload
    def __init__(self, proxy: Object): ...
    @overload
    def __init__(self, areaView: ViewPlan, point: UV): ...
    @property
    def TagPoint(self) -> UV: ...
    @TagPoint.setter
    def TagPoint(self, value: UV) -> None: ...


class Document(ItemFactoryBase):
    def NewSpotCoordinate(self, view: View, reference: Reference, origin: XYZ, bend: XYZ, end: XYZ, refPt: XYZ, hasLeader: bool) -> SpotDimension: ...
    def NewSpotElevation(self, view: View, reference: Reference, origin: XYZ, bend: XYZ, end: XYZ, refPt: XYZ, hasLeader: bool) -> SpotDimension: ...
    @overload
    def NewFloor(self, profile: CurveArray, floorType: FloorType, level: Level, structural: bool, normal: XYZ) -> Floor: ...
    @overload
    def NewFloor(self, profile: CurveArray, floorType: FloorType, level: Level, structural: bool) -> Floor: ...
    @overload
    def NewFloor(self, profile: CurveArray, structural: bool) -> Floor: ...
    def NewFoundationSlab(self, profile: CurveArray, floorType: FloorType, level: Level, structural: bool, normal: XYZ) -> Floor: ...
    @overload
    def NewRoom(self, room: Room, circuit: PlanCircuit) -> Room: ...
    @overload
    def NewRoom(self, phase: Phase) -> Room: ...
    @overload
    def NewRoom(self, level: Level, point: UV) -> Room: ...
    @overload
    def NewRooms2(self, phase: Phase, count: int) -> ICollection: ...
    @overload
    def NewRooms2(self, level: Level, phase: Phase) -> ICollection: ...
    @overload
    def NewRooms2(self, level: Level) -> ICollection: ...
    def NewRoomTag(self, roomId: LinkElementId, point: UV, viewId: ElementId) -> RoomTag: ...
    def NewPointBoundaryConditions(self, reference: Reference, X_Translation: TranslationRotationValue, X_TranslationSpringModulus: float, Y_Translation: TranslationRotationValue, Y_TranslationSpringModulus: float, Z_Translation: TranslationRotationValue, Z_TranslationSpringModulus: float, X_Rotation: TranslationRotationValue, X_RotationSpringModulus: float, Y_Rotation: TranslationRotationValue, Y_RotationSpringModulus: float, Z_Rotation: TranslationRotationValue, Z_RotationSpringModulus: float) -> BoundaryConditions: ...
    @overload
    def NewLineBoundaryConditions(self, hostElement: Element, X_Translation: TranslationRotationValue, X_TranslationSpringModulus: float, Y_Translation: TranslationRotationValue, Y_TranslationSpringModulus: float, Z_Translation: TranslationRotationValue, Z_TranslationSpringModulus: float, X_Rotation: TranslationRotationValue, X_RotationSpringModulus: float) -> BoundaryConditions: ...
    @overload
    def NewLineBoundaryConditions(self, reference: Reference, X_Translation: TranslationRotationValue, X_TranslationSpringModulus: float, Y_Translation: TranslationRotationValue, Y_TranslationSpringModulus: float, Z_Translation: TranslationRotationValue, Z_TranslationSpringModulus: float, X_Rotation: TranslationRotationValue, X_RotationSpringModulus: float) -> BoundaryConditions: ...
    @overload
    def NewAreaBoundaryConditions(self, hostElement: Element, X_Translation: TranslationRotationValue, X_TranslationSpringModulus: float, Y_Translation: TranslationRotationValue, Y_TranslationSpringModulus: float, Z_Translation: TranslationRotationValue, Z_TranslationSpringModulus: float) -> BoundaryConditions: ...
    @overload
    def NewAreaBoundaryConditions(self, reference: Reference, X_Translation: TranslationRotationValue, X_TranslationSpringModulus: float, Y_Translation: TranslationRotationValue, Y_TranslationSpringModulus: float, Z_Translation: TranslationRotationValue, Z_TranslationSpringModulus: float) -> BoundaryConditions: ...
    @overload
    def NewOpening(self, hostElement: Element, profile: CurveArray, bPerpendicularFace: bool) -> Opening: ...
    @overload
    def NewOpening(self, wall: Wall, pntStart: XYZ, pntEnd: XYZ) -> Opening: ...
    @overload
    def NewOpening(self, bottomLevel: Level, topLevel: Level, profile: CurveArray) -> Opening: ...
    @overload
    def NewOpening(self, famInstElement: Element, profile: CurveArray, iFace: eRefFace) -> Opening: ...
    def NewSlab(self, profile: CurveArray, level: Level, slopedArrow: Line, slope: float, isStructural: bool) -> Floor: ...
    def NewAreaBoundaryLine(self, sketchPlane: SketchPlane, geometryCurve: Curve, areaView: ViewPlan) -> ModelCurve: ...
    def NewAreaTag(self, areaView: ViewPlan, room: Area, point: UV) -> AreaTag: ...
    def NewArea(self, areaView: ViewPlan, point: UV) -> Area: ...
    def NewAreas(self, dataList: List) -> ElementSet: ...
    def NewFootPrintRoof(self, footPrint: CurveArray, level: Level, roofType: RoofType) -> Tuple[FootPrintRoof, ModelCurveArray]: ...
    def NewExtrusionRoof(self, profile: CurveArray, refPlane: ReferencePlane, level: Level, roofType: RoofType, extrusionStart: float, extrusionEnd: float) -> ExtrusionRoof: ...
    def NewMechanicalSystem(self, baseEquipmentConnector: Connector, connectors: ConnectorSet, ductSystemType: DuctSystemType) -> MechanicalSystem: ...
    def NewPipingSystem(self, baseEquipmentConnector: Connector, connectors: ConnectorSet, pipingSystemType: PipeSystemType) -> PipingSystem: ...
    @overload
    def NewSpace(self, level: Level, phase: Phase, point: UV) -> Space: ...
    @overload
    def NewSpace(self, level: Level, point: UV) -> Space: ...
    @overload
    def NewSpace(self, phase: Phase) -> Space: ...
    @overload
    def NewSpaces2(self, phase: Phase, count: int) -> ICollection: ...
    @overload
    def NewSpaces2(self, level: Level, phase: Phase, view: View) -> ICollection: ...
    def NewSpaceTag(self, space: Space, point: UV, view: View) -> SpaceTag: ...
    def NewSpaceBoundaryLines(self, sketchPlane: SketchPlane, curves: CurveArray, view: View) -> ModelCurveArray: ...
    def NewRoomBoundaryLines(self, sketchPlane: SketchPlane, curves: CurveArray, view: View) -> ModelCurveArray: ...
    def NewZone(self, level: Level, phase: Phase) -> Zone: ...
    def NewCurtainSystem2(self, faces: ReferenceArray, curtainSystemType: CurtainSystemType) -> ICollection: ...
    def NewCurtainSystem(self, faces: FaceArray, curtainSystemType: CurtainSystemType) -> CurtainSystem: ...
    @overload
    def NewSlabEdge(self, SlabEdgeType: SlabEdgeType, reference: Reference) -> SlabEdge: ...
    @overload
    def NewSlabEdge(self, SlabEdgeType: SlabEdgeType, references: ReferenceArray) -> SlabEdge: ...
    @overload
    def NewGutter(self, GutterType: GutterType, reference: Reference) -> Gutter: ...
    @overload
    def NewGutter(self, GutterType: GutterType, references: ReferenceArray) -> Gutter: ...
    @overload
    def NewFascia(self, FasciaType: FasciaType, reference: Reference) -> Fascia: ...
    @overload
    def NewFascia(self, FasciaType: FasciaType, references: ReferenceArray) -> Fascia: ...
    @overload
    def NewFamilyInstance(self, curve: Curve, symbol: FamilySymbol, level: Level, structuralType: StructuralType) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, location: XYZ, symbol: FamilySymbol, level: Level, structuralType: StructuralType) -> FamilyInstance: ...
    @overload
    def NewFamilyInstance(self, location: XYZ, symbol: FamilySymbol, host: Element, level: Level, structuralType: StructuralType) -> FamilyInstance: ...
    @overload
    def NewFlexDuct(self, connector1: Connector, connector2: Connector, ductType: FlexDuctType) -> FlexDuct: ...
    @overload
    def NewFlexDuct(self, connector: Connector, points: List[XYZ], ductType: FlexDuctType) -> FlexDuct: ...
    @overload
    def NewFlexDuct(self, points: List[XYZ], ductType: FlexDuctType) -> FlexDuct: ...
    @overload
    def NewFlexPipe(self, connector1: Connector, connector2: Connector, pipeType: FlexPipeType) -> FlexPipe: ...
    @overload
    def NewFlexPipe(self, connector: Connector, points: List[XYZ], pipeType: FlexPipeType) -> FlexPipe: ...
    @overload
    def NewFlexPipe(self, points: List[XYZ], pipeType: FlexPipeType) -> FlexPipe: ...
    def NewElbowFitting(self, connector1: Connector, connector2: Connector) -> FamilyInstance: ...
    def NewTeeFitting(self, connector1: Connector, connector2: Connector, connector3: Connector) -> FamilyInstance: ...
    def NewTransitionFitting(self, connector1: Connector, connector2: Connector) -> FamilyInstance: ...
    def NewCrossFitting(self, connector1: Connector, connector2: Connector, connector3: Connector, connector4: Connector) -> FamilyInstance: ...
    def NewUnionFitting(self, connector1: Connector, connector2: Connector) -> FamilyInstance: ...
    def NewTakeoffFitting(self, connector: Connector, curve: MEPCurve) -> FamilyInstance: ...


class eRefFace:
    CenterX = 1
    CenterY = 4
    CenterZ = 7
