Class: Sketchup::ComponentInstance

Inherits:
Object
  • Object
show all

Overview

Instance Method Summary # collapse

Instance Method Details

#dfc_get_common_attributeHash

取得公共属性

Examples:

group.dfc_get_common_attribute

Returns:

  • (Hash)

    属性 key、value 集合。如果没有属性,返回空的 Hash

Version:

  • 2.1.2

#dfc_get_material_attributeArray<Hash>

取得材料属性

Examples:

group.dfc_get_material_attribute

Returns:

  • (Array<Hash>)

    attrs 属性

Version:

  • 2.1.2

#dfc_get_product_attributeArray<Hash>

取得产品属性

Examples:

group.dfc_get_product_attribute

Returns:

  • (Array<Hash>)

    attrs 属性

Version:

  • 2.1.2

#dfc_set_common_attribute(attr_hash) ⇒ Nil

设置公共属性

Examples:

attr_hash = {
  'XM_MC' => '1F-防火区A-房间A-地面装饰', # 项目_名称 -> 楼层+区域+房间+工具名
  'XM_SM' => '', # 项目_说明
  'WZ_LC' => '1F', # 位置_楼层
  'WZ_QY' => '防火区A', # 位置_区域
  'WZ_FJ' => '房间A', # 位置_房间
  'DX_LX' => '项目组', # 对象_类型,可选项为:项目组、材料组、产品组、材料、产品
  'QT_WYM' => 'ID_F_XM_180605_001', # 唯一码
  'SJ_JM' => '{"页签":"花样铺贴"...............}', # 数据_界面
  'CJ_GJ' => %w[室内 地面装饰 花样铺贴], # 创建_工具
  'QT_BB' => DFC_BIM::CURRENT_VERSION, # 其他_版本
}
group.dfc_set_common_attribute(attr_hash)

Parameters:

  • attr_hash (Hash)

    属性 key、value 集合

Returns:

  • (Nil)

Version:

  • 2.1.2

#dfc_set_material_attribute(attrs) ⇒ Nil

设置材料属性

 attrs = [
   {
     'CP_ID' => 'xxxxxxx',
     'CP_XH' => 'xxxxxxx',
     'WL_LX' => '产品',
     'WL_JG' => false,   # 物料是否甲供  默认false
     'WL_ZC' => false,   # 物料是否甲供  默认false
   },
   {
     'CL_ID' => 'xxxxxxx',
     'CL_XH' => 'xxxxxxx',
     'CZ_SY' => 0,
     'CL_LX' => '主材',   # 有了 WL_ZC  这个属性将废弃
     'WL_LX' => '材料',
     'WL_JG' => false,   # 物料是否甲供  默认false
     'WL_ZC' => false,   # 物料是否甲供  默认false
   }
 ]
group.dfc_set_material_attribute(attrs)

Parameters:

  • attrs (Array<Hash>)

    属性

Returns:

  • (Nil)

Version:

  • 2.1.2

#dfc_set_product_attribute(attrs) ⇒ Nil

设置产品属性

Examples:

attrs = [
  {
    'CP_ID' => 'xxxxxxx',
    'CP_XH' => 'xxxxxxx',
    'WL_LX' => '产品',
    'WL_JG' => false,   # 物料是否甲供  默认false
    'WL_ZC' => false,   # 物料是否甲供  默认false
  },
  {
    'CL_ID' => 'xxxxxxx',
    'CL_XH' => 'xxxxxxx',
    'CZ_SY' => 0,
    'CL_LX' => '主材',   # 有了 WL_ZC  这个属性将废弃
    'WL_LX' => '材料',
    'WL_JG' => false,   # 物料是否甲供  默认false
    'WL_ZC' => false,   # 物料是否甲供  默认false
  }
]
group.dfc_set_product_attribute(attrs)

Parameters:

  • attrs (Array<Hash>)

    属性

Returns:

  • (Nil)

Version:

  • 2.1.2