void
ArxDbgDbAdeskLogo::subList() const
{
	ArxDbgDbEntity::subList();

	CString str;

	AcGeScale3d sc = scale();
	printForListCmd(_T("Scale X"), ArxDbgUtils::doubleToStr(sc.sx, str));
	printForListCmd(_T("Scale Y"), ArxDbgUtils::doubleToStr(sc.sy, str));
	printForListCmd(_T("Scale Z"), ArxDbgUtils::doubleToStr(sc.sz, str));

	ArxDbgDbAdeskLogoStyle* style;
	Acad::ErrorStatus es = acdbOpenObject(style, logoStyleId(), AcDb::kForRead);
	if (es == Acad::eOk) {
		es = style->getName(str);
		if (es != Acad::eOk)
			str = ArxDbgUtils::rxErrorStr(es);

		style->close();
	}
	else
		str = ArxDbgUtils::rxErrorStr(es);

	printForListCmd(_T("Style"), str);

	printForListCmd(_T("Arbitrary Reference"), ArxDbgUtils::objToClassAndHandleStr(m_arbitraryRefEnt, str));
}
void
ArxDbgDbAdeskLogo::commonDraw(AcGiCommonDraw* drawContext)
{
    if (drawContext->regenAbort())
        return;

    AcGeMatrix3d scaleMat;
    m_scale.getMatrix(scaleMat);

    AcGeMatrix3d mat;
    getEcs(mat);   // push ECS of this Logo
    mat *= scaleMat;

    drawContext->rawGeometry()->pushModelTransform(mat);

    ArxDbgDbAdeskLogoStyle* lStyle = NULL;
    Acad::ErrorStatus es = acdbOpenObject(lStyle, m_logoStyleId, AcDb::kForRead);

    drawLogo(drawContext, lStyle);
    drawLabel(drawContext, lStyle);
    drawBorder(drawContext, lStyle);

    if (es == Acad::eOk)
        lStyle->close();

    drawContext->rawGeometry()->popModelTransform();

	drawRefLine(drawContext);
}
AcDbObjectId
ArxDbgDbAdeskLogoStyle::getStandardStyle(AcDbDatabase* db, bool makeIfNotThere)
{
    Acad::ErrorStatus es;
    AcDbObjectId styleId;
    AcDbDictionary* dict;

	const char* standardStrPtr = acdbGetReservedString(AcDb::kStandard, false);
	ASSERT(standardStrPtr != NULL);
	
	dict = ArxDbgUtils::openDictionaryForRead(m_dictName, db);
    if (dict) {
        es = dict->getAt(standardStrPtr, styleId);
		dict->close();

		if (es == Acad::eOk)
			return styleId;

		if (makeIfNotThere == false)
			return AcDbObjectId::kNull;
	}

		// wasn't already there, so we need to make it
	dict = ArxDbgUtils::openDictionaryForWrite(m_dictName, true, db);
	if (dict) {
        ArxDbgDbAdeskLogoStyle* newRec = new ArxDbgDbAdeskLogoStyle;
        es = dict->setAt(standardStrPtr, newRec, styleId);
		dict->close();
        if (es == Acad::eOk) {
            newRec->close();
			return styleId;
        }
        else {
            acutPrintf("\nERROR: Could not add new ArxDbgDbAdeskLogoStyle (%s)", ArxDbgUtils::rxErrorStr(es));
            delete newRec;
        }
    }

	return AcDbObjectId::kNull;
}