【C# ORD中国版】有关自定义Cim对象特殊类型EC属性中字体ExtendType设置无效的问题

根据CIMSDK官方帮助文档,3.4.1.4条,可以通过配置EC属性下的ECCustomAttributes子节点,另其ExtendedType子节点包含<Standard>27</Standard>子节点来设置EC属性的显示样式时一个可以通过下拉列表获取字体的功能,官方帮助文档示例如下。

<ECProperty propertyName="Origin" typeName="point3d">
    <ECCustomAttributes>
        <ExtendType xmlns="EditorCustomAttributes.01.00">
            <Standard>7</Standard>
        </ExtendType>        
    </ECCustomAttributes>
</ECProperty>

但我根据文档的要求对我的EC属性进行了如下设置

<ECProperty propertyName="TextFont" typeName="int" displayLabel="字体">
      <ECCustomAttributes>
        <PropertyPriority xmlns="EditorCustomAttributes.01.00">
          <Priority>15700</Priority>
        </PropertyPriority>
        <ExtendedType xmlns="EditorCustomAttributes.01.00">
          <Standard>27</Standard>
        </ExtendedType>
      </ECCustomAttributes>
    </ECProperty>

可是实际在软件中运行以后,“字体”属性并未出现希望的下拉列表,而是一个什么也没有的输入框,如下图所示。

请问我是哪里设置的有问题?

Parents
  • 这个您先在MS上添加类似的代码,看看是否有效果。

  • 试过了,一样没有下拉框,还是基本的输入框,是不是我哪里配置错了?

  • 试试我这个Schema文件

    <?xml version="1.0" encoding="utf-8"?>
    <ECSchema schemaName="MyECSchema" nameSpacePrefix="MyNSPre" version="1.0" description="MyDesc" displayLabel="MyDisLab" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.2.0">
        <ECSchemaReference name="EditorCustomAttributes" version="01.03" prefix="beca" />
    	<ECClass typeName="MyClass" description="MyDesc" displayLabel="MyClassDisLab" isDomainClass="True">
            <ECProperty propertyName="PropStr" typeName="string" />
            <ECProperty propertyName="PropDou" typeName="double" />
            <ECProperty propertyName="PropPt" typeName="point3d" />
            <ECProperty propertyName="Font_Name" typeName="int">
                <ECCustomAttributes>
                    <ExtendType xmlns="EditorCustomAttributes.01.03">
                        <Standard>27</Standard>
                    </ExtendType>
    			</ECCustomAttributes>
            </ECProperty>
        </ECClass>
    </ECSchema>

    Answer Verified By: 霄男 宿 

Reply
  • 试试我这个Schema文件

    <?xml version="1.0" encoding="utf-8"?>
    <ECSchema schemaName="MyECSchema" nameSpacePrefix="MyNSPre" version="1.0" description="MyDesc" displayLabel="MyDisLab" xmlns="http://www.bentley.com/schemas/Bentley.ECXML.2.0">
        <ECSchemaReference name="EditorCustomAttributes" version="01.03" prefix="beca" />
    	<ECClass typeName="MyClass" description="MyDesc" displayLabel="MyClassDisLab" isDomainClass="True">
            <ECProperty propertyName="PropStr" typeName="string" />
            <ECProperty propertyName="PropDou" typeName="double" />
            <ECProperty propertyName="PropPt" typeName="point3d" />
            <ECProperty propertyName="Font_Name" typeName="int">
                <ECCustomAttributes>
                    <ExtendType xmlns="EditorCustomAttributes.01.03">
                        <Standard>27</Standard>
                    </ExtendType>
    			</ECCustomAttributes>
            </ECProperty>
        </ECClass>
    </ECSchema>

    Answer Verified By: 霄男 宿 

Children