Esempio n. 1
0
BOOL Additional_Class::Get_LineTypeID( CString linetype, AcDbObjectId &linetypeid )
{
	AcDbLinetypeTable *pLtpTbl;
	acdbHostApplicationServices()->workingDatabase()->getLinetypeTable(pLtpTbl,AcDb::kForRead);
	if (!pLtpTbl->has((linetype	)))
	{
		pLtpTbl->close();
		return FALSE;
	}
	pLtpTbl->getAt(linetype, linetypeid);
	pLtpTbl->close();
	return TRUE;
}
Esempio n. 2
0
static Acad::ErrorStatus GetLinetypeId(const CString& linetype, AcDbObjectId &linetypeId)
{
	AcDbLinetypeTable *pLtpTbl;
	acdbHostApplicationServices()->workingDatabase()->getLinetypeTable(pLtpTbl, AcDb::kForRead);
	if (!pLtpTbl->has(linetype))
	{
		pLtpTbl->close();
		return Acad::eBadLinetypeName;
	}
	pLtpTbl->getAt(linetype, linetypeId);
	pLtpTbl->close();
	return Acad::eOk;
}
Esempio n. 3
0
BOOL Additional_Class::Add_LineType( CString linetype )
{
	AcDbLinetypeTable *pLtpTbl;
	acdbHostApplicationServices()->workingDatabase()->getLinetypeTable(pLtpTbl,AcDb::kForRead);
	if (pLtpTbl->has((linetype	)))
	{
		pLtpTbl->close();
		return TRUE;
	}
	pLtpTbl->close();
	Acad::ErrorStatus es;
	es	= acdbHostApplicationServices()->workingDatabase()->loadLineTypeFile(linetype, _T("ZWCADiso.lin"));
	return TRUE;
}