天气与日历 切换到窄版

 找回密码
 立即注册
中国膜结构网
十大进口膜材评选 十大国产膜材评选 十大膜结构设计评选 十大膜结构公司评选
查看: 35|回复: 0

arx 代码

[复制链接]
  • TA的每日心情
    开心
    昨天 06:36
  • 签到天数: 15 天

    [LV.4]偶尔看看III

    105

    主题

    11

    回帖

    1308

    积分

    管理员

    积分
    1308
    QQ
    发表于 2024-9-28 17:39:47 | 显示全部楼层 |阅读模式
    // <summary> Writes members out to the drawing filer. </summary>
    Acad::ErrorStatus TPG_Drawable::dwgOutFields(AcDbDwgFiler* filer) const
    {
            Acad::ErrorStatus es = TPG_Object::dwgOutFields(filer);
            if (es != Acad::eOk)
                    return es;

            Utilities::FilerUtilities::FileOutEntity(filer, mBody);        Utilities::FilerUtilities::FileOutEntities(filer, mEdges);
            filer->writePoint3d(mPlacement);
            filer->writeVector3d(mOffset);
            return filer->filerStatus();
    }

    /// <summary> Reads memebers in from the drawing filer. </summary>
    Acad::ErrorStatus TPG_Drawable::dwgInFields(AcDbDwgFiler* filer)
    {
            Acad::ErrorStatus es = TPG_Object::dwgInFields(filer);
            if (es != Acad::eOk)
                    return es;

            Utilities::FilerUtilities::FileInEntity(filer, static_cast<AcDbEntity*&>(mBody));
            Utilities::FilerUtilities::FileInEntities(filer, mEdges);
            filer->readPoint3d(&mPlacement);
            filer->readVector3d(&mOffset);

            return filer->filerStatus();
    }


    /// <summary> Writes out the properties of a single entity. </summary>
    static Acad::ErrorStatus FileOutEntity(AcDbDwgFiler* filer, const AcDbEntity* entity)
    {
            Adesk::Boolean isDef = entity ? Adesk::kTrue : Adesk::kFalse;
            filer->writeBoolean(isDef);

            if (isDef)
            {
                    AcString name = entity->isA()->name();
                    filer->writeString(name);

                    entity->dwgOutFields(filer);
            }
            return filer->filerStatus();
    }

    /// <summary> Reads in the properties of a single entity. </summary>
    static Acad::ErrorStatus FileInEntity(AcDbDwgFiler* filer, AcDbEntity*& entity)
    {
            if (entity)
            {
                    delete entity;
                    entity = nullptr;
            }

            Adesk::Boolean isDef = Adesk::kFalse;
            AcString name = L"";

            filer->readBoolean(&isDef);
            if (isDef)
            {
                    filer->readString(name);
                    AcRxClass* rx = static_cast<AcRxClass*>(acrxClassDictionary->at(name));

                    if (rx)
                    {
                            entity = static_cast<AcDbEntity*>(rx->create());
                            if (entity)
                                    entity->dwgInFields(filer);
                            else
                                    filer->setFilerStatus(Acad::eNotAnEntity);
                    }
            }
            return filer->filerStatus();
    }

     

     

     

     

    arx 代码
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|中国膜结构网|中国膜结构协会|进口膜材|国产膜材|ETFE|PVDF|PTFE|设计|施工|安装|车棚|看台|污水池|中国膜结构网_中国空间膜结构协会

    GMT+8, 2024-11-1 10:36 , Processed in 0.191401 second(s), 25 queries .

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表