59 lines
1.7 KiB
C++
59 lines
1.7 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// = FileName : TDbEquRelativeDim
|
|
// = Version : ver2.0
|
|
// = Author : axc
|
|
// = CreateDate : 2015-05-28
|
|
// = Description: 设备关联时显示图纸上设备的扩展信息
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef __TDBEQURELATIVEDIM_H__
|
|
#define __TDBEQURELATIVEDIM_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#ifdef _TCHPIPEBASE_
|
|
#define DLLIMPEXP __declspec(dllexport)
|
|
#else
|
|
#ifdef _TCHPIPEBASE_COM_
|
|
#define DLLIMPEXP
|
|
#else
|
|
#define DLLIMPEXP __declspec(dllimport)
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef TCHPIPEBASE_DBXSERVICE
|
|
#define TCHPIPEBASE_DBXSERVICE "TCHPIPEBASE_DBXSERVICE"
|
|
#endif
|
|
|
|
class DLLIMPEXP TDbEquRelativeDim : public TDbEntity
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbEquRelativeDim);
|
|
public:
|
|
TDbEquRelativeDim(Entity& ent,int nColor);
|
|
TDbEquRelativeDim();
|
|
~TDbEquRelativeDim();
|
|
|
|
protected:
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
//创建标注线
|
|
void ExplodeOrDraw2dLine(XExplodeDraw &dc) const;
|
|
//创建标注文字
|
|
void ExplodeOrDraw2dText(XExplodeDraw &dc) const;
|
|
double GetTextLen(LPCTSTR lpText) const;
|
|
BOOL GetDimContent(CString& sDimText);
|
|
private:
|
|
Entity m_ent; //需要显示标注内容的设备
|
|
AcDbObjectId m_id; //将标注设备实体添加到模型空间后返回的id便于删除
|
|
AcDbObjectId m_idTextStyle; //文字样式
|
|
AcGePoint3d m_ptIns; //设备插入点
|
|
AcGePoint3d m_ptTurn; //转折点
|
|
double m_nTextHeight; //文字高度
|
|
double m_dTextRowDis; //文字间行间距系数
|
|
double m_dLineBaseLen; //线最初长度
|
|
CString m_sDimText; //标注内容
|
|
int m_nColor; //标注颜色,如果为255,则颜色跟随标注设备图层LAY_CABLELAY_EQUIP
|
|
};
|
|
|
|
#endif //__TDbEquRelativeDim_H__
|