- UID
- 5043
- 积分
- 1357
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-13
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
[pcode=cpp,true]
static LPCTSTR mtextAttachmentTypeToStr(AcDbMText::AttachmentPoint type, CString& str);
static LPCTSTR mtextFlowDirTypeToStr(AcDbMText::FlowDirection type, CString& str);
static LPCTSTR lineSpacingTypeToStr(AcDb::LineSpacingStyle type, CString& str);
static LPCTSTR proxyMetafileTypeToStr(AcDbProxyEntity::GraphicsMetafileType type, CString& str);
static LPCTSTR lineWeightTypeToStr(AcDb::LineWeight type, CString& str);
static LPCTSTR mergeStyleToStr(AcDb::DuplicateRecordCloning type, CString& str);
static LPCTSTR standardScaleTypeToStr(AcDbViewport::StandardScaleType type, CString& str);
static LPCTSTR dwgVersionToStr(AcDb::AcDbDwgVersion type, CString& str);
static LPCTSTR orthoViewToStr(AcDb::OrthographicView type, CString& str);
static LPCTSTR renderModeToStr(AcDbAbstractViewTableRecord::RenderMode type, CString& str);
static LPCTSTR measurementTypeToStr(AcDb::MeasurementValue type, CString& str);
static LPCTSTR unitTypeToStr(AcDb::UnitsValue type, CString& str);
static LPCTSTR xrefStatusToStr(AcDb::XrefStatus stat, CString& str);
static LPCTSTR saveFormatToStr(AcApDocument::SaveFormat type, CString& str);
static LPCTSTR longTransactionTypeToStr(int type, CString& str);
[/pcode]
[sell=10]
/***********************************************************************
**
** XdAcadUi::mtextAttachmentTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::mtextAttachmentTypeToStr(AcDbMText::AttachmentPoint type, CString& str)
{
if (type == AcDbMText::kTopLeft)
str = _T("Top Left");
else if (type == AcDbMText::kTopCenter)
str = _T("Top Center");
else if (type == AcDbMText::kTopRight)
str = _T("Top Right");
else if (type == AcDbMText::kMiddleLeft)
str = _T("Middle Left");
else if (type == AcDbMText::kMiddleCenter)
str = _T("Middle Center");
else if (type == AcDbMText::kMiddleRight)
str = _T("Middle Right");
else if (type == AcDbMText::kBottomLeft)
str = _T("Bottom Left");
else if (type == AcDbMText::kBottomCenter)
str = _T("Bottom Center");
else if (type == AcDbMText::kBottomRight)
str = _T("Bottom Right");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::mtextFlowDirTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::mtextFlowDirTypeToStr(AcDbMText::FlowDirection type, CString& str)
{
if (type == AcDbMText::kLtoR)
str = _T("Left to Right");
else if (type == AcDbMText::kRtoL)
str = _T("Right to Left");
else if (type == AcDbMText::kTtoB)
str = _T("Top to Bottom");
else if (type == AcDbMText::kBtoT)
str = _T("Bottom to Top");
else if (type == AcDbMText::kByStyle)
str = _T("By Style");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::lineSpacingTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::lineSpacingTypeToStr(AcDb::LineSpacingStyle type, CString& str)
{
if (type == AcDb::kAtLeast)
str = _T("At Least");
else if (type == AcDb::kExactly)
str = _T("Exactly");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::proxyMetafileTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::proxyMetafileTypeToStr(AcDbProxyEntity::GraphicsMetafileType type, CString& str)
{
if (type == AcDbProxyEntity::kNoMetafile)
str = _T("No Metafile");
else if (type == AcDbProxyEntity::kBoundingBox)
str = _T("Bounding Box");
else if (type == AcDbProxyEntity::kFullGraphics)
str = _T("Full Graphics");
else {
ASSERT(0);
XdAcadUi::intToStr(type, str);
}
return str;
}
/***********************************************************************
**
** XdAcadUi::lineWeightTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::lineWeightTypeToStr(AcDb::LineWeight type, CString& str)
{
if (type == AcDb::kLnWt000)
str = _T("0.00 mm");
else if (type == AcDb::kLnWt005)
str = _T("0.05 mm");
else if (type == AcDb::kLnWt009)
str = _T("0.09 mm");
else if (type == AcDb::kLnWt013)
str = _T("0.13 mm");
else if (type == AcDb::kLnWt015)
str = _T("0.15 mm");
else if (type == AcDb::kLnWt018)
str = _T("0.18 mm");
else if (type == AcDb::kLnWt020)
str = _T("0.20 mm");
else if (type == AcDb::kLnWt025)
str = _T("0.25 mm");
else if (type == AcDb::kLnWt030)
str = _T("0.30 mm");
else if (type == AcDb::kLnWt035)
str = _T("0.35 mm");
else if (type == AcDb::kLnWt040)
str = _T("0.40 mm");
else if (type == AcDb::kLnWt050)
str = _T("0.50 mm");
else if (type == AcDb::kLnWt053)
str = _T("0.53 mm");
else if (type == AcDb::kLnWt060)
str = _T("0.60 mm");
else if (type == AcDb::kLnWt070)
str = _T("0.70 mm");
else if (type == AcDb::kLnWt080)
str = _T("0.80 mm");
else if (type == AcDb::kLnWt090)
str = _T("0.90 mm");
else if (type == AcDb::kLnWt100)
str = _T("1.00 mm");
else if (type == AcDb::kLnWt106)
str = _T("1.06 mm");
else if (type == AcDb::kLnWt120)
str = _T("1.20 mm");
else if (type == AcDb::kLnWt140)
str = _T("1.40 mm");
else if (type == AcDb::kLnWt158)
str = _T("1.58 mm");
else if (type == AcDb::kLnWt200)
str = _T("2.00 mm");
else if (type == AcDb::kLnWt211)
str = _T("2.11 mm");
else if (type == AcDb::kLnWtByLayer)
str = _T("ByLayer");
else if (type == AcDb::kLnWtByBlock)
str = _T("ByBlock");
else if (type == AcDb::kLnWtByLwDefault)
str = _T("ByLwDefault");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::mergeStyleToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::mergeStyleToStr(AcDb::DuplicateRecordCloning type, CString& str)
{
if (type == AcDb::kDrcNotApplicable)
str = _T("Not Applicable");
else if (type == AcDb::kDrcIgnore)
str = _T("Ignore");
else if (type == AcDb::kDrcReplace)
str = _T("Replace");
else if (type == AcDb::kDrcXrefMangleName)
str = _T("Xref Mangle Name");
else if (type == AcDb::kDrcMangleName)
str = _T("Mangle Name");
else if (type == AcDb::kDrcUnmangleName)
str = _T("Unmangle Name");
else {
//ASSERT(0);
str.Format(_T("*Unknown* (%d)"), type);
}
return str;
}
/***********************************************************************
**
** XdAcadUi::standardScaleTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::standardScaleTypeToStr(AcDbViewport::StandardScaleType type, CString& str)
{
if (type == AcDbViewport::kScaleToFit)
str = _T("Scaled To Fit");
else if (type == AcDbViewport::kCustomScale)
str = _T("Custom Scale");
else if (type == AcDbViewport::k1_1)
str = _T("1:1");
else if (type == AcDbViewport::k1_2)
str = _T("1:2");
else if (type == AcDbViewport::k1_4)
str = _T("1:4");
else if (type == AcDbViewport::k1_8)
str = _T("1:8");
else if (type == AcDbViewport::k1_10)
str = _T("1:10");
else if (type == AcDbViewport::k1_16)
str = _T("1:16");
else if (type == AcDbViewport::k1_20)
str = _T("1:20");
else if (type == AcDbViewport::k1_30)
str = _T("1:30");
else if (type == AcDbViewport::k1_40)
str = _T("1:40");
else if (type == AcDbViewport::k1_50)
str = _T("1:50");
else if (type == AcDbViewport::k1_100)
str = _T("1:100");
else if (type == AcDbViewport::k2_1)
str = _T("2:1");
else if (type == AcDbViewport::k4_1)
str = _T("4:1");
else if (type == AcDbViewport::k8_1)
str = _T("8:1");
else if (type == AcDbViewport::k10_1)
str = _T("10:1");
else if (type == AcDbViewport::k100_1)
str = _T("100:1");
else if (type == AcDbViewport::k1_128in_1ft)
str = _T("1/128\"= 1'");
else if (type == AcDbViewport::k1_64in_1ft)
str = _T("1/64\"= 1'");
else if (type == AcDbViewport::k1_32in_1ft)
str = _T("1/32\"= 1'");
else if (type == AcDbViewport::k1_16in_1ft)
str = _T("1/16\"= 1'");
else if (type == AcDbViewport::k3_32in_1ft)
str = _T("3/32\"= 1'");
else if (type == AcDbViewport::k1_8in_1ft)
str = _T("1/8\" = 1'");
else if (type == AcDbViewport::k3_16in_1ft)
str = _T("3/16\"= 1'");
else if (type == AcDbViewport::k1_64in_1ft)
str = _T("1/64\" = 1'");
else if (type == AcDbViewport::k1_4in_1ft)
str = _T("1/4\" = 1'");
else if (type == AcDbViewport::k3_8in_1ft)
str = _T("3/8\" = 1'");
else if (type == AcDbViewport::k1_2in_1ft)
str = _T("1/2\" = 1'");
else if (type == AcDbViewport::k3_4in_1ft)
str = _T("3/4\" = 1'");
else if (type == AcDbViewport::k1in_1ft)
str = _T("1\"= 1'");
else if (type == AcDbViewport::k3in_1ft)
str = _T("3\"= 1'");
else if (type == AcDbViewport::k6in_1ft)
str = _T("6\"= 1'");
else if (type == AcDbViewport::k1ft_1ft)
str = _T("1'= 1'");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::dwgVersionToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::dwgVersionToStr(AcDb::AcDbDwgVersion type, CString& str)
{
CString verStr;
if (type == AcDb::kDHL_MC0_0)
verStr = _T("kDHL_MC0_0");
else if (type == AcDb::kDHL_AC1_2)
verStr = _T("kDHL_AC1_2");
else if (type == AcDb::kDHL_AC1_40)
verStr = _T("kDHL_AC1_40");
else if (type == AcDb::kDHL_AC1_50)
verStr = _T("kDHL_AC1_50");
else if (type == AcDb::kDHL_AC2_20)
verStr = _T("kDHL_AC2_20");
else if (type == AcDb::kDHL_AC2_10)
verStr = _T("kDHL_AC2_10");
else if (type == AcDb::kDHL_AC2_21)
verStr = _T("kDHL_AC2_21");
else if (type == AcDb::kDHL_AC2_22)
verStr = _T("kDHL_AC2_22");
else if (type == AcDb::kDHL_1001)
verStr = _T("kDHL_1001");
else if (type == AcDb::kDHL_1002)
verStr = _T("kDHL_1002 (AutoCAD 2.5)");
else if (type == AcDb::kDHL_1003)
verStr = _T("kDHL_1003 (AutoCAD 2.6)");
else if (type == AcDb::kDHL_1004)
verStr = _T("kDHL_1004 (Release 9)");
else if (type == AcDb::kDHL_1005)
verStr = _T("kDHL_1005");
else if (type == AcDb::kDHL_1006)
verStr = _T("kDHL_1006 (Release 10)");
else if (type == AcDb::kDHL_1007)
verStr = _T("kDHL_1007");
else if (type == AcDb::kDHL_1008)
verStr = _T("kDHL_1008");
else if (type == AcDb::kDHL_1009)
verStr = _T("kDHL_1009 (R11 and R12)");
else if (type == AcDb::kDHL_1010)
verStr = _T("kDHL_1010");
else if (type == AcDb::kDHL_1011)
verStr = _T("kDHL_1011");
else if (type == AcDb::kDHL_1012)
verStr = _T("kDHL_1012 (Release 13)");
else if (type == AcDb::kDHL_1013)
verStr = _T("kDHL_1013 (R14 Mid Version)");
else if (type == AcDb::kDHL_1014)
verStr = _T("kDHL_1014 (R14 Final Version)");
else if (type == AcDb::kDHL_1500)
verStr = _T("kDHL_1500 (R15 Development)");
else if (type == AcDb::kDHL_1015)
verStr = _T("kDHL_1015 (R15 Final Version)");
else {
ASSERT(0);
verStr = _T("*Unknown*");
}
str.Format(_T("%d = %s"), type, verStr);
return str;
}
/***********************************************************************
**
** XdAcadUi::orthoViewToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::orthoViewToStr(AcDb::OrthographicView type, CString& str)
{
if (type == AcDb::kNonOrthoView)
str = _T("Non Ortho");
else if (type == AcDb::kTopView)
str = _T("Top");
else if (type == AcDb::kBottomView)
str = _T("Bottom");
else if (type == AcDb::kFrontView)
str = _T("Front");
else if (type == AcDb::kBackView)
str = _T("Back");
else if (type == AcDb::kLeftView)
str = _T("Left");
else if (type == AcDb::kRightView)
str = _T("Right");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::renderModeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::renderModeToStr(AcDbAbstractViewTableRecord::RenderMode type, CString& str)
{
if (type == AcDbAbstractViewTableRecord::k2DOptimized)
str = _T("2D Optimized");
else if (type == AcDbAbstractViewTableRecord::kWireframe)
str = _T("Wireframe");
else if (type == AcDbAbstractViewTableRecord::kHiddenLine)
str = _T("Hidden Line");
else if (type == AcDbAbstractViewTableRecord::kFlatShaded)
str = _T("Flat Shaded");
else if (type == AcDbAbstractViewTableRecord::kGouraudShaded)
str = _T("Gouraud Sahded");
else if (type == AcDbAbstractViewTableRecord::kFlatShadedWithWireframe)
str = _T("Flat Shaded With Wireframe");
else if (type == AcDbAbstractViewTableRecord::kGouraudShadedWithWireframe)
str = _T("Gouraud Shaded With Wireframe");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::measurementTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::measurementTypeToStr(AcDb::MeasurementValue type, CString& str)
{
if (type == AcDb::kEnglish)
str = _T("English");
else if (type == AcDb::kMetric)
str = _T("Metric");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/***********************************************************************
**
** XdAcadUi::unitTypeToStr
**
** **jma
**
****************************************/
LPCTSTR
XdAcadUi::unitTypeToStr(AcDb::UnitsValue type, CString& str)
{
if (type == AcDb::kUnitsUndefined)
str = _T("Undefined");
else if (type == AcDb::kUnitsInches)
str = _T("Inches");
else if (type == AcDb::kUnitsFeet)
str = _T("Feet");
else if (type == AcDb::kUnitsMiles)
str = _T("Miles");
else if (type == AcDb::kUnitsMillimeters)
str = _T("Millimeters");
else if (type == AcDb::kUnitsCentimeters)
str = _T("Centimeters");
else if (type == AcDb::kUnitsMeters)
str = _T("Meters");
else if (type == AcDb::kUnitsKilometers)
str = _T("Kilometers");
else if (type == AcDb::kUnitsMicroinches)
str = _T("Microinches");
else if (type == AcDb::kUnitsMils)
str = _T("Mils");
else if (type == AcDb::kUnitsYards)
str = _T("Yards");
else if (type == AcDb::kUnitsAngstroms)
str = _T("Angstroms");
else if (type == AcDb::kUnitsNanometers)
str = _T("Nanometers");
else if (type == AcDb::kUnitsMicrons)
str = _T("Microns");
else if (type == AcDb::kUnitsDecimeters)
str = _T("Decimeters");
else if (type == AcDb::kUnitsDekameters)
str = _T("Dekameters");
else if (type == AcDb::kUnitsHectometers)
str = _T("Hectometers");
else if (type == AcDb::kUnitsGigameters)
str = _T("Gigameters");
else if (type == AcDb::kUnitsAstronomical)
str = _T("Astronomical");
else if (type == AcDb::kUnitsLightYears)
str = _T("Light Years");
else if (type == AcDb::kUnitsParsecs)
str = _T("Parsecs");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/****************************************************************************
**
** XdAcadUi::xrefStatusToSTr
**
** **jma
**
*************************************/
LPCTSTR
XdAcadUi::xrefStatusToStr(AcDb::XrefStatus stat, CString& str)
{
if (stat == AcDb::kXrfNotAnXref)
str = _T("Not An Xref");
else if (stat == AcDb::kXrfResolved)
str = _T("Xref Resolved");
else if (stat == AcDb::kXrfUnloaded)
str = _T("Xref Unloaded");
else if (stat == AcDb::kXrfUnreferenced)
str = _T("Xref Unreferenced");
else if (stat == AcDb::kXrfFileNotFound)
str = _T("Xref File Not Found");
else if (stat == AcDb::kXrfUnresolved)
str = _T("Xref Unresolved");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/****************************************************************************
**
** XdAcadUi::saveFormatToStr
**
** **jma
**
*************************************/
LPCTSTR
XdAcadUi::saveFormatToStr(AcApDocument::SaveFormat type, CString& str)
{
if (type == AcApDocument::kUnknown)
str = _T("Invalid");
else if (type == AcApDocument::kR12_dxf)
str = _T("AutoCAD R12/LT2 DXF (*.dxf)");
else if (type == AcApDocument::kR13_dwg)
str = _T("AutoCAD R13/LT95 Drawing (*.dwg)");
else if (type == AcApDocument::kR13_dxf)
str = _T("AutoCAD R13/LT95 DXF (*.dxf)");
else if (type == AcApDocument::kR14_dwg)
str = _T("AutoCAD R14/LT97 Drawing (*.dwg)");
else if (type == AcApDocument::kR14_dxf)
str = _T("AutoCAD R14/LT97 DXF (*.dxf)");
else if (type == AcApDocument::kR15_dwg)
str = _T("AutoCAD R15 Drawing (*.dwg)");
else if (type == AcApDocument::kR15_dxf)
str = _T("AutoCAD R15 DXF (*.dxf)");
else if (type == AcApDocument::kR15_Template)
str = _T("R15 Drawing Template File (*.dwt)");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
/****************************************************************************
**
** XdAcadUi::longTransactionTypeToStr
**
** **jma
**
*************************************/
LPCTSTR
XdAcadUi::longTransactionTypeToStr(int type, CString& str)
{
if (type == AcDbLongTransaction::kSameDb)
str = _T("Same Database");
else if (type == AcDbLongTransaction::kXrefDb)
str = _T("Xref Database");
else if (type == AcDbLongTransaction::kUnrelatedDb)
str = _T("Unrelated Database");
else {
ASSERT(0);
str = _T("*Unknown*");
}
return str;
}
[/sell]
|
评分
-
查看全部评分
|