//////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2025 by Autodesk, Inc.  All rights reserved.
//
// This computer source code and related instructions and comments 
// are the unpublished confidential and proprietary information of 
// Autodesk, Inc. and are protected under applicable copyright and 
// trade secret law.  They may not be disclosed to, copied or used 
// by any third party without the prior written consent of Autodesk, Inc.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef __ACM_H
#define __ACM_H

#include "AdAChar.h"

#ifndef PI
const double PI  = 3.14159265358979323846;
#endif // PI

#ifndef PI_2
#define PI_2 PI/2.0
#endif // PI_2

#ifndef PI_4
#define PI_4 PI/4.0
#endif // PI_$

#ifndef TWOPI
#define TWOPI PI * 2.0
#endif // TWOPI

const int NUM_TAPER_SYM_SUBTYPE = 11;

struct Acm {
    enum ErrorStatus {
        eOk = 0,                    // generic goodness (== Acad::eOk)
        eBad = 1000,                // generic badness
        eNotImplementedYet,
        eNotSupported,
        eTransactionNotOpen,
        eBadName,
        eDependentsExist,
        eCyclicGraph,
        eNodeAlreadyInGraph,
        eInvalidInput,
        eObjectNotInDatabase,
        eObjectNotInMap,
        eDuplicateEntry,
        eConnectionsExist,
        eDefunCommandCancelled,
        eGeometryIsUnbounded,
        eNullContext,
        eInvalidContext,
        eInconsistentGraph,
        eXPickNotSupported,
        eGrefCreationFailed,
        eMultiplePlanesFound,
        eSubentityNotSupported,
        eUGrReplicateNodeError,
        eDGrReplicateNodeError,
        eCancel,
        eZombieObject,
        eReferredObjectDeleted,
        eReferredObjectEdited,
        eInvalidGeomRef,
        eMultipleSurfacesFound,
        eBadInput,
        eBackingImpossible,
        eAssociationImpossible,
        eStaggerImpossible,
        eSpacerImpossible,
        eInvalidWeldType,
        eStandardIsNotLoaded,
        eIntendToDeleteBaseStandard,
        eStandardIsReferenced,
        eAcMeFail,
        eKeyAlreadyExist,
        eDefinedByStandard,
        eUpdateRequest,
        eEraseRequest,
        eMoveRequest,
        eMultipleGeometryAttached,
        eGeometryAlreadyAttached,
        eNoGeometryReference,
        eOtherView,
        eIsEmpty,
        eMultipleArrowheads,
        eSinglePartView,
        eItemIsInUse,
        eCannotDeleteItem,
        eGeometrySuppresed
    };

    enum SymbolStyleState
    {
        kCurrent = 0,
        kEdited
    };

    enum SubSymbolType
    {
        kNoneSymbol = 0,
        kSurfText,
        kDatum,
        kFCF,
        kDatumId,
        kFeatureId,

        kFilletWeld,
        kSecondaryFillet,
        kPlugWeld,
        kSlotWeld,
        kStudWeld,
        kSpotWeld,
        kSpotOnRefLineWeld,
        kSeamWeld,
        kSeamOnRefLineWeld,
        kBackWeld,
        kSurfacingWeld,
        kFlangeEdgeWeld,
        kFlangeCornerWeld,
        kSqureGrooveWeld,
        kScarfGrooveWeld,
        kVGrooveWeld,
        kBevelGrooveWeld,
        kUGrooveWeld,
        kJGrooveWeld,
        kFlareVGrooveWeld,
        kFlareBevelGrooveWeld,
        kEdgeWeld,
        kFoldJointWeld,
        kInclinedJointWeld,
        kSurfaceJointWeld,
        kSteepFlankedVWeld,
        kSteepFlankedBevelWeld,
        kSingleVBroadRootFace,
        kSingleBevelBroadRootFace,
        kPermanentBackingStripWeld,
        kRemovableBackingStripWeld,
        kMeltThrough,
        kConsInsert,
        kFlushContour,
        kConvexContour,
        kConcaveContour,
        kSmoothContour,
        kFlushFinishedContour,
        kWeldingTail,
        kWeldAllAround,
        kFieldWeld,
        kSpecialStaggerWeld,
        kBevelGrooveShapeWeld,
        kWeldAllAroundSquare,
        kFieldWeldEmpty,
        kExamination,
        kBackLendingWeld,
        kRoundedWeld,
        kHalfRoundedWeld,
        kHalfWWeld,
        kWWeld,
        kWeldMullded,
        kWeldGroovedRoot,                
        kWWeld2,
        kUVWeld,
        kConcaveSmoothContour,
        kGostWeld,
        kCutEnforceWeld,
        kSmoothWeld,
        kOpenContourWeld,
        kIntermittentWeld,
        kZigzagWeld,  
		kStakeWeld,
		kBackRunWeld,
		kUnspecBackingWeld,
        kAlternativeButtWeld,
        kUserSymbolType = 1000
    };

    enum GdtSymbolType 
    {
        kNoType = 0,
        kStraightness = 1,
        kFlatness,
        kCircularity,
        kCylindricity,
        kProfileLine,
        kProfileSurface,
        kAngularity,
        kPerpendicularity,
        kParallelism,
        kPosition,
        kConcentricity,
        kSymmetry,
        kRunoutCircular,
        kRunoutTotal,
        kLeastMaterialCondition,
        kMaximumMaterialCondition,
        kProjectedToleranceZone,
        kTangentPlane,
        kFreeState,
        kEnvelope,
        kRegardlessOfFeatureSize,
        kStatisticalTolerance,
        kDiameter,
        kBetween,
        kReciprocityCondition,
        kSquare,
        kProfileSection,
        kAxiality,
        kRunoutCircularFilled,
        kRunoutTotalFilled,
        kConcentricityForCentrePoints,
        kCoaxialityForAxes,
        kCommonZone,
        kMinorDiameter,
        kMajorDiameter,
        kPitchDiameter,
        kLineElement,
        kNotConvex,
        kAnyCrossSection,
        kMedianfeature,
        kFromTo,
        kUnequallyDisposedTol,
        kAnyLongSection,
        kContactingFeature,
        kVariableDist,
        kSituFeatPoint,
        kStraigntLine,
        kSituFeatPlane,
        kOrientationConstraintOnly,
        kUnequallyDisposedProfile,
        kSeparateZone,
        kOffsetZone,
        kVariableAngle,
        kMinimaxFeature,
        kLeastSquaresFeature,
        kMinCircumscribedFeature,
        kTangentFeature,
        kMaxInscribedFeature,
        kMinimaxFeatureWithoutConstraint,
        kMinimaxFeatureExternalMatConstraint,
        kMinimaxFeatureInternalMatConstraint,
        kLeastSquaresWithoutConstraint,
        kLeastSquaresWithExtMatConstraint,
        kLeastSquaresWithIntMatConstraint,
        kMinCircumscribedFeature2,
        kMaxInscribedFeature2,
        kTotalRangeDeviations,
        kPeakHeight,
        kValleyDepth,
        kStandardDeviation,
        kUnitedFeature,
        kReciprocityRequirement,
        kTranslation,
        kIndependency,
        kContinuousFeature,
        kSphericalDiameter,
        kRadius,
        kSphericalRadius,
        kControlledRadius,
        kDynamicProfile,
        kangularity = kAngularity,
        kUserSymbolGDT = 1000
    };

    enum LeaderDirClass {
        kAbovePrimRefLine,
        kAlongPrimRefLine,
        kBelowPrimRefLine
    };

    enum WeldLocation
    {
        kArrowSide = 0,
        kOtherSide,
        kOnlyOnRefLine,
        kOnlyOnArrowSide,
        kOnlyOnOtherSide,
        kOnBothSides
    };
    ///<summary>it defines weld symbol association type. It affects the drawing of symbol geometry.</summary>
    enum WeldAssociation
    {
        kNoAssociation = 0,
        kAssociationSpacer,
        kAssociationMoveStagger,
        kAssociationMirrorStagger,
        kAssociationSpecialStagger,
        kAssociationBacking
    };
    ///<summary>It defines which side of symbol will be affected by association type(WeldAssociation). It affects the drawing of symbol geometry.</summary>
    enum WeldSideAssociation
    {
        kAssoc2ArrowSide = 0,
        kAssoc2OtherSide
    };
    ///<summary>It defines all possible combinations of WeldAssociation & WeldSideAssociation enumerations for stagger option in the UI.</summary>
    enum EnabledStaggerFlag
    {
        kNoEnableStagger                = 0x0000,
        kEnableMoveStaggerOnArrow       = 0x0001 << 0,
        kEnableMoveStaggerOnOther       = 0x0001 << 1,
        kEnableMirrorStaggerOnArrow     = 0x0001 << 2,
        kEnableMirrorStaggerOnOther     = 0x0001 << 3,
        kEnableSpecialStaggerOnArrow    = 0x0001 << 4,
        kEnableSpecialStaggerOnOther    = 0x0001 << 5
    };
    enum EnabledSpacerFlag
    {
        kNoSpacer                       = 0x0000,
        kOneSidedSpacer                 = 0x0001 << 0,
        kBothSidedSpacer                = 0x0001 << 1
    };
    enum IdentLineType
    {
        kNoIdentLine = 0,
        kIdentLineOtherSide,
        kIdentLineArrowSide
    };

    enum WeldGroup
    {
        kWeld = 0,
        kContour,
        kBacking,
        kAreaDesc,
        kSizeSymbol,
        kSecondarySymbol
    };

    enum WeldLocationFilter
    {
        kForBothSides = 0,
        kForOtherSide,
        kForArrowSide,
    };

    enum SymbolAttachmentPoint {
      kTopLeft  = 1,
      kTopCenter  = 2,
      kTopRight = 3,
      kMiddleLeft = 4,
      kMiddleCenter = 5,
      kMiddleRight  = 6,
      kBottomLeft = 7,
      kBottomCenter = 8,
      kBottomRight  = 9
    };

    enum Visibility
    {
      kHidden = 0,
      kDisabled = 1,
      kShaded = 1,
      kSelectOnly,
      kVisible
    };

    enum CheckStatus
    {
      kOk = 0,
      kErrorType,
      kErrorRange,
      kError,
      kNotApplicable
    };

    enum Orientation
    {
      kLeftSide = 0,
      kRightSide,
      kBelow,
      kAbove
    };

    enum SortDirection {
      kNotSorted = 0,
      kAscending,
      kDescending
    };

    enum PointType
    {
      kAtStartRefLine = 0,
      kAtMiddleRefLine,
      kAtEndRefLine
    };

    enum SurfTextType
    {   
      kBasic                        = 0,
      kRemovalOfMaterialRequired,
      kRemovalOfMaterialProhibited,
      kRemovalAllowanceSpecified
    };

    enum DirectionLayType
    {   
      kNotSpecified                      = 0,
      kParallelToPlaneOfProjection,
      kPerpendicularToPlaneOfProjection,
      kCrossedIn2SlantDirections,
      kMultiDirection,
      kCircularRelativeToCenter,
      kRadialRelativeToCenter,
      kParticulateNonDirectional,
      kUserDirectionLayType = 1000
    };

    enum ProfileDirectionType
    {
        kNotSpecifiedDir = 0,
        kPerpendicularToPredominantDir,
        kParallelToPredominantDir,
        kCircularToCenter,
        kAngleToPredominantDir,
        kUserProfileDirectionType = 1000
    };

    enum TaperType
    {
      kTaperAtEndRefLn = 0,
      kSlopeAtEndRefLn,
      kSlopeAtEndRefLn2,
      kTaperThruRefLn,
      kSlopeOnRefLn,
      kSlopeOnRefLn2,
      kSlopeAboveRefLn,
      kSlopeAboveRefLn2,
      kTaperAboveRefLn,
      kSlopeOpenAboveRefLn,
      kSlopeOpenAboveRefLn2
    };

    enum DataType
    {
      kGeneralText = 0,
      kInteger,
      kDouble
    };

    enum TargetType {        
        kNoTarget = 0,
        kBalloon,
        kPoint,        
        kLine,
        kCircular,
        kRectangular,
        kAttach
    };

    enum ArrowType {
        kNoArrow = 0,
        kArrowOpen,
        kArrowOpen15,
        kArrowOpen30,
        kArrowOpen60,
        kArrowOpen90,
        kArrowEmpty,
        kArrowEmpty15,
        kArrowEmpty30,
        kArrowEmpty60,
        kArrowEmpty90,
        kArrowClosed,
        kArrowClosed15,
        kArrowClosed30,
        kArrowClosed60,
        kArrowClosed90,
        kArrowFilled,
        kArrowFilled15,
        kArrowFilled30,
        kArrowFilled60,
        kArrowFilled90,
        kArrowBoxBlank,
        kArrowBoxFilled,
        kArrowDatumBlank45,
        kArrowDatumFilled45,
        kArrowDatumBlank60,
        kArrowDatumFilled60,
        kArrowDot,
        kArrowDotBlank,
        kArrowOblique,
        kArrowOrigin,
        kByStandard,
        kArrowDatumThickLine,
        kArrowDotSmall,
        kArrowDotBlankSmall,
        kArrowFilledHalf,
        kArrowEmptyHalf,
        kArrowAcadArchTick,
        kArrowAcadBoxBlank,
        kArrowAcadBoxFilled,
        kArrowAcadClosed,
        kArrowAcadClosedBlank,
        kArrowAcadClosedFilled,
        kArrowAcadDatumBlank,
        kArrowAcadDatumFilled,
        kArrowAcadDot,
        kArrowAcadDotBlank,
        kArrowAcadDotSmall,
        kArrowAcadIntegral,
        kArrowAcadNone,
        kArrowAcadOblique,
        kArrowAcadOpen,
        kArrowAcadOpen30,
        kArrowAcadOpen90,
        kArrowAcadOrigin,
        kArrowAcadOrigin2,
        kArrowAcadSmall,
        kUserArrowDialog,
        kVaries,
        kArrowFilled20,
        kUserArrowType = 1000
    };
    
    enum ArrowGroup {
        kAcadArrow = 0,
        kStandardArrow,
        kAcadDimStyleArrow,
        kUserArrow
    };

    enum AlignmentType {
      kLeft = 0,
      kCenter,
      kRight
    };              

    enum ColType {
      kPartID = 0,
      kItem,
      kQuantity,
      kPLName,
      kPLPath,
      kDescription,
      kDescription2,
      kStandard,
      kStandard2,
      kMaterial,
      kMaterial2,
      kUserID,
      kMass,
      kPrice,
      kDimension,
      kUser1,
      kUser2,
      kUser3,
      kUser4,
      kUser5,
      kUser6,
      kUser7,
      kUser8,
      kFilter,
      kNote,
      kVendor,
      kAssembly,
      kDmID,
      kName,      
      kUnknown,
      kUnitOfMeasure,
      kCategory,
      kFormat,
      kZone,
      kComments,
      kPartNumber,
      kTotalMass
    };

    enum BalloonType {
      kByStdBalloon=0,
      kNoBalloon,
      kCircBallon,
      kCirc2Ballon,
      kLinearBallon,
      kEmptyBallon,
      kNAngeBallon,
	  kZigZagBallon, //Bal-Peck
      kUserBalloon = 1000
   };

    enum PartListDirection {
      kTopDown = 0,
      kBottonUp
    };
    
    enum PartListMultipleRow {
      kSingleRow = 1,
      kDoubleRow,
      kTripleRow
    };
  
    enum HeadingPlacement {
      kUp = 0,
      kDown,
      kNone
    };

    enum DataEntType {
    };

    enum Direction {
      kToLeft = 0,
      kToRight,
      kToTop,
      kToBottom
    };

    enum AttachPosition {
      kAttachLeft = 0,
      kAttachRight,
      kAttachTop,
      kAttachBottom
    };
    
    enum BalloonCollectionType {
      kHorizontal = 0,
      kVertical
    };

    enum BalloonAttachType {
      kToCenter = 0,
      kToExtents,
      kToOrigin
    };

    enum LineTypes {
      none = 0,
      hairLine,
      smallLine,
      middleLine,
      bigLine,
      dblSmallLine,
      dblBigLine
    };

    enum class EdgeUndefinedDirection : Adesk::UInt16
    {
      kAtTop = 0,
      kAtSide = 1
    };

    enum class EdgeSignType : Adesk::UInt16
    {
        kNoDefined = 0,
        kBurnPassingPermitted = 1,
        kUndercutRequired = 2
    };

    enum class EdgeOptionsType : Adesk::UInt16
    {
        kDefineAllEdges     = 0,
        kDefineOutsideEdges = 1,
        kDefineInsideEdges  = 2,
        kMajorityWithMoreEx = 3,
        kMajorityWithOneEx  = 4
    };

    enum class EdgeDirectionType : Adesk::UInt16
    {
        kNoValues   = 0,
        kUndefined  = 1,
        kVertical   = 2,
        kHorizontal = 3,
        kBoth       = 4
    };

    enum Variable {
      //Surface texture
      SurfTextRaMax = 0,
      SurfTextRaMin,
      SurfTextProduction,
      SurfTextProduction2,
      SurfTextAllowance,
      SurfTextDirLay,
      SurfTextSampLeanght,
      SurfTextCutoff,
      SurfTextOtherValue,
      SurfTextOtherMin,
      SurfTextMaxRspac,
      SurfTextReference,
      SurfTextWavines,
      SurfTextComment,
      SurfTextForcedTail,
      SurfTextMajority,
      SurfTextAllAround,
      SurfTextSubType,
      //FCF
      FCFSymbol,
      FCFSymbol2,
      FCFTolerance,
      FCFTolerance2,
      FCFToleranceB,
      FCFToleranceB2,
      FCFDatumPrimary,
      FCFDatumPrimary2,
      FCFDatumSecondary,
      FCFDatumSecondary2,
      FCFDatumTertiary,
      FCFDatumTertiary2,
      FCFProjectedZone,
      FCFDatumId,
      FCFTopNote,
      FCFBottomNote,
      //Datum Id
      DatumIdText,
      //Weld
      WeldSize,
      WeldThickness,
      WeldLength,
      WeldNumber,
      WeldSpacing,
      WeldAngle,
      WeldDepth,
      WeldPitch,
      WeldGap,
      WeldClearance,
      WeldBacking,
      WeldBrazing,
      WeldFinishing,
      WeldContour,
      WeldNotes,
      WeldClosedTail,
      //Datum target
      DatumTargetSize,
      DatumTargetText,
      DatumTargetMovable,
      //Note
      NoteExpression,
      NoteEvalText,
      // Edge
      EdgeMax,
      EdgeMin,
      EdgeSign,
      //Detail Sym
      DetailSymLabelPattern,
      DetailSymLabelName,
      DetailSymScale,
      DetailSymShowBorder,
      DetailSymShowLeader,
      DetailSymShowAnnotLeader,
      //Section Sym
      SectionSymLabelPattern,
      SectionSymLabelName,
      //Taper and Slope
      TaperSubType,
      TaperOrient,
      TaperInspect,
      TaperDisplayStr,
      TaperSubSymAngle,
      TaperSymAboveCurve,
      TaperDimX,
      TaperIsCalculated,
      TaperDimType,
      // Surface Texture Symbol (R12)
      SurfTextFirstReq,
      SurfTextSecondReq,
      SurfTextThirdReq,
      //Annotation View
      AVSymLabelPattern,
      AVSymLabelText,
      // Surface Texture Symbol
      SurfTextFourthReq,
      // Feature Control
      FCFSymbol3,
      FCFTolerance3,
      FCFDatumPrimary3,
      FCFDatumSecondary3,
      FCFDatumTertiary3,
      // Weld
      WeldIndex,
      WeldIndexTotal,
      WeldStandard,
      WeldDesignation,
      WeldSpecification,
      WeldControlCategory,
      WeldTechnicalReq,
      WeldSize2,
      WeldSizeSymbol,
      WeldSecondarySymbol,
      // Marking and Stamping
      MarkStampContents,
      MarkStampMethod,
      MarkStampTechReq,
      //Joint symbol
      JointAnnotation,
      JointSecAnnotation,
      //Datum Id (ISO2004 revision)
      DatumIdDatumNote,
      DatumIdThreadNote,
      //Weld (ISO2013 revision)
      WeldDistance, //distance type
      WeldDistPalette, // control display of Dist Palette
      WeldPrepDepth,
      WeldDiameter,
      WeldWidth,
      WeldStartPoint,
      WeldEndPoint,
      WeldFillingDepth,
      WeldIncludedAngle,
      WeldCountersinkAngle,
      WeldType,
      WeldStaggerAuxDist,
      WeldISOSymbol,
      WeldIsFull,
      WeldFromPoint,
      WeldToPoint,
      //FCF Help Variable for CLI Property List 2021
      FCFAllAround,
      FCFFrame1,
      FCFFrame2,
      FCFFrame3,
      // Surface Texture Symbol rev ISO 2021 & ANSI 2018
      SurfTextRowPos1,
      SurfTextRowPos2,
      SurfTextRowPos2_3,
      SurfTextRowPos3,
      SurfTextRowPos4,
      SurfTextRowPos5,
      SurfTextRowPos6,
      SurfTextProfileDir,
      SurfTextDeviations,
      SurfTextMultiRowDesc,
      SurfTextMultiSubSymbol,
      //FCF Symbol rev ISO 1101:2017
      FCFMultiRowDesc,      ///Multi-row descriptor enabler
      FCFRowSymbol,         ///Geometric Symbol type for multi-row descriptor
      FCFRowToleranceA,     ///Tolerance 1 string for multi-row descriptor
      FCFRowToleranceB,     ///Tolerance 2 string for multi-row descriptor
      FCFRowDatumA,         ///Datum 1 string for multi-row descriptor
      FCFRowDatumB,         ///Datum 2 string for multi-row descriptor
      FCFRowDatumC,         ///Datum 3 string for multi-row descriptor
      FCFRowInLineNote,     ///InLine note for multi-row descriptor
      FCFMultiIndicatorDesc,///Multi-indicator descriptor enabler
      FCFRowFIdentifier,    ///the plane and feature indicator type for multi-indicator descriptor
      FCFRowFType,          ///Geometric Symbol type for multi-indicator descriptor
      FCFRowFLabel,         ///Indicator datum string for multi-indicator descriptor
      FCFAttachmentPosition,///The geometrical specification indication shall be connected to the leader line by a reference line.
      // new Edge variables for ACM 2025
      EdgeUnDefinedSizeDirect,
      EdgeDefinedDirect,
      EdgeUnsizedFlag,
      EdgeStdNum,
      EdgeNewRev,
      EdgeAllAround,
      //EdgeMajority, // removed in Xenon 2027
      EdgeType,
      // new Edge variables for Xenon 2027
      EdgeAsMax,    ///Asymmetrical Indications of max direction
      EdgeAsMin,    ///Asymmetrical Indications of min direction
      EdgeIndOpt,   ///Operator for Indication - now represent only one type "Limited area" - not used
      EdgeIndFrom,  ///Indicator "From" of Limited area
      EdgeIndTo,    ///Indicator "To" of Limited area
      EdgeQuantityOpt,   ///Operator for Quantity property - not used
      EdgeQuantity,  ///Quantity of edge indication
      EdgeOptions,   ///Represents the general apparency of edge - see repr4esented by Acm::EdgeOptionsType enum
      EdgePosition,  ///Represents the position of the edge indication directions - see repr4esented by Acm::EdgeDirectionType enum


      //////////////////////////////////////////////////////////////////////////
      // end of items array
      kUserVariable = 1000
    };

    enum RowType {
      kSingle=0,
      kExpandable,
      kIsExpanded
    };

    enum MergePickArray {
      kAppend=0,
      kRemove,
      kRemoveNotContaining,
      kRemoveNotContainingMainBom,
      kRemoveNotContainingBlockBom,
      kMergeWithBom,
      kMergeWithMainBom,
      kMergeWithBlockBom
    };

    enum ProjectionType {
      kFirstAngle = 0,
      kThirdAngle
    };

    enum ListInsertionPoint {
      kInsTopLeft = 0,
      kInsBottomLeft,
      kInsBottomRight,
      kInsTopRight
    };

    enum StdVariable {
      kUnits = 0,
      kListAttach,
      kTextHeight,
      kTextStyle,
      kArrowType,
      kProjectionType,
      kScale,
      kTextColor,
      kArrowSize,
      kArrowColor
    };
    
    enum DimStyleMode {
      kLeadersOnly = 0,
      kLeadersAndDimensions
    };

    enum SectionSymLineSegmentType {
      kLineSegment = 0,
      kArcSegmentSecond,
      kArcSegmentCenter
    };

    enum UOMType {
      Each=0, sqm, sqcm, sqft, sqin, gal, qt, lqd_oz, l, ml, yd, ft, in, m, cm, mm, lb, oz, g, mg, bx
    };

    enum BOMType {
      kExpanded=0, kStructural  
    };

    enum AnnotLabelPositionType
    {
      kAnnotLabelBelow  = 1,
      kAnnotLabelAbove  = 2,
    };

    enum FilterType
    {
      kFilterBasic = 0,
      kFilterBallooned,
      kFilterCustom,
      kFilterParts,
      kFilterStdParts,
      kFilterSheet,
      kFilterView,
      kFilterRange
    };

    enum MarkStampType
    {
      kMarking = 0,
      kStamping
    };

    enum TaperDimensionType{
      kRatio = 0,
      kPercentage,
      kUserFormat
    };

    enum TaperRatioFormat{
      kFraction = 0, 
      kNoFraction, 
      kNumber
    };

    enum JointType
    {
      kSoldering = 0,
      kGluing,
      kStitching,
      kOverlapping,
      kCorner
    };

    enum JointLocation
    {
      kOnArrowSide = 0,
      kOnOtherSide,
    };
      
    enum TaperSlopeSymType
    {
      kTaper1 = 0,
      kTaper2,
      kSlope1,
      kSlope2
    };

    //BomOverride type: It is used in BOM related dialogs and part reference edit dialogs.
    enum BomOverrideType{
      kNoOverride = 0,
      kQtyOverride,
      kFormulaOverride,
      kImportOverride,
      kContentOverride,
      kMassOverride
    };

    enum WeldingProcessType {
      kNoProcesses     = 0x00,
      kProcesses       = 0x01,
      kTransferModes   = 0x02,
      kAdditionalItems = 0x04,
      kProcessesAll = kProcesses | kTransferModes | kAdditionalItems,
    };

    enum WeldingProcessInsertType {
      kNoInsert         = 0x00,
      kInsertProcess    = 0x01,
      kInsertWithPrefix = 0x02,
      kInsertAsHybrid   = 0x04,
      kInsertProcessAll = kInsertProcess | kInsertWithPrefix | kInsertAsHybrid,
    };

    enum class WeldingDistanceType : Adesk::UInt16
    {
        kIntermittentType = 0, //default type
        kTwoPointType = 1,
        kContinuous = 2,
        kFromTo = 3,
        kToFrom = 4,
        kNoType = 5,
    };

    enum class SurfTextAppModifierType : Adesk::UInt16
    {
        kNoModifier     = 0,
        kAllAround      = 1,
        kAllOver        = 2
    };

    enum class GdtIndicatorType : Adesk::UInt16
    {
        kNotDefined = 0,
        kIntersectionPlane = 1,
        kOrientationPlane = 2,
        kCollectionPlane = 3,
        kDirectionFeature = 4,
    };

    enum class FCFAttachmentPoint : Adesk::UInt16
    {
        kNotPredefined = 0,
        kCenterOfBoundingBox = 1,
        kCenterOfFirstLine = 2,
        kCenterOfLastLine = 3,
    };
};

#define MESSAGE(x) acadErrorStatusText(x)

#define INTERNAL_STATUS_ERROR(x) \
  acrx_abort(ACRX_T(/*MSG0*/"!%s@%d: %s"), ACRX_T(__FILE__), __LINE__, MESSAGE(x))

#define AOK(what) { Acad::ErrorStatus stat = what; \
      if (stat != Acad::eOk) INTERNAL_STATUS_ERROR(stat); }

#endif //__ACM_H
