→Graphisoftホームページ→ArchiCAD教育版ダウンロード →ArchiCAD体験版ダウンロード →ArchiCAD仲間

作成者:

KazuoHamaji

作成日:

2009-08-20

ArchiCADバージョン

• ArchiCAD 14
• ArchiCAD 13
• ArchiCAD 12

プラットフォーム:

• Mac OS X
• Windows

対象:

• 上級ユーザー
• CADマネージャー

参照番号:

• [tracking number]

カスタム建具をキープランに対応させる方法

この記事では、カスタム建具をキープランに対応させる方法について説明します。自作の窓やドアオブジェクトにGDLスクリプトを追加する事で、キープランが表示されるようになります。

以下の手順に従ってください。

  1. 保存した建具を開き、サブタイプを日本建具に設定します(例:窓の場合、「ACJX1窓_内障子付」。ドアの場合、「ACJX1ドア」)。

    01.png

  2. 自作建具の「2Dスクリプト」に以下のスクリプトを貼り付けます。窓には「窓用」、ドアには「ドア用」を使用してください。

    02.png

    2Dスクリプト(窓用)

    FRAGMENT2 all, 1
    
    !______________________________  Markers  ____________________
    
    shxx=0
    xxx = REQUEST ("WINDOW_DOOR_SHOW_DIM", "", shxx)
    
    add2 0, k_
    
    un_id=1000
    
    IF shxx = 1 and key_mark_flag = 1 then
    
            !____________________________ Symbol marker __________________
            
            !************************** hotspot **************************
            
            !------------------------------- keyplan
            !********** circle center
            !***** circle center X
            hotspot2 -1,k_lena,un_id,k_lenb,3
            un_id=un_id+1
            hotspot2 0,k_lena,un_id,k_lenb,1+128
            un_id=un_id+1
            hotspot2 k_lenb,k_lena,un_id,k_lenb,2
            un_id=un_id+1
            
            !***** circle center Y
            hotspot2 k_lenb,-1,un_id,k_lena,3
            un_id=un_id+1
            hotspot2 k_lenb,0,un_id,k_lena,1+128
            un_id=un_id+1
            hotspot2 k_lenb,k_lena,un_id,k_lena,2
            un_id=un_id+1
    
            !********** circle radius
            !***** left
            hotspot2 k_lenb+1, k_lena, un_id, k_dia, 3
            un_id = un_id+1
            hotspot2 k_lenb, k_lena, un_id, k_dia, 1+128
            un_id = un_id+1
            hotspot2 k_lenb-k_dia, k_lena, un_id, k_dia, 2
            un_id=un_id+1
            !***** right
            hotspot2 k_lenb-1, k_lena, un_id, k_dia, 3
            un_id = un_id+1
            hotspot2 k_lenb, k_lena, un_id, k_dia, 1+128
            un_id = un_id+1
            hotspot2 k_lenb+k_dia, k_lena, un_id, k_dia, 2
            un_id=un_id+1
    
            if a_>50 then
                    elong = c_/2
            else
                    elong = fgd
            endif
    
            !************************************************* marker
    
            if key_mark_type = "タイプ1" then
                    marker_type = 0
            else
                    marker_type = 1
            endif
    
            CALL "AC80_symbol_marker" PARAMETERS k_dia = k_dia, \
                    k_line = k_line,
                    k_lenb = k_lenb,
                    k_lena = k_lena,
                    pen_text = pen_marker,
                    pen_symbol = pen_marker,
                    pen_fill = pen_marker,
                    type_fill = IND(fill, "zone_hider_fill"),
                    tfont = tfont,
                    w_type_name = w_type_name,
                    d_type_name = "",
                    s_type_name = "",
                    type_no = type_no_tx,
                    kaj_door_ident = kaj_door_ident,
                    globid = GLOB_ID,
                    elong = elong,
                    k_idflag = k_idflag,
                    fill_flag=flag_zonehider,
                    marker_type = marker_type,
                    op_elv = GLOB_ELEVATION,
                    op_height = B
    
    endif
            
    !________________________ Regulation marker __________________
    
    if reg_mark_flag = 1 and w_regulations<>"未定" and w_regulations<>"法規制なし" then
    
            !************************** hotspot **************************
    
            !********** circle center
            !***** circle center X
            hotspot2 -1,r_lena,un_id,r_lenb,3
            un_id=un_id+1
            hotspot2 0,r_lena,un_id,r_lenb,1+128
            un_id=un_id+1
            hotspot2 r_lenb,r_lena,un_id,r_lenb,2
            un_id=un_id+1
            
            !***** circle center Y
            hotspot2 r_lenb,-1,un_id,r_lena,3
            un_id=un_id+1
            hotspot2 r_lenb,0,un_id,r_lena,1+128
            un_id=un_id+1
            hotspot2 r_lenb,r_lena,un_id,r_lena,2
            un_id=un_id+1
    
            !********** circle radius
            !***** left
            hotspot2 r_lenb+1, r_lena, un_id, r_dia, 3
            un_id = un_id+1
            hotspot2 r_lenb, r_lena, un_id, r_dia, 1+128
            un_id = un_id+1
            hotspot2 r_lenb-r_dia, r_lena, un_id, r_dia, 2
            un_id=un_id+1
            !***** right
            hotspot2 r_lenb-1, r_lena, un_id, r_dia, 3
            un_id = un_id+1
            hotspot2 r_lenb, r_lena, un_id, r_dia, 1+128
            un_id = un_id+1
            hotspot2 r_lenb+r_dia, r_lena, un_id, r_dia, 2
            un_id=un_id+1
    
            !*************************************************************
    
            CALL "AC80_regulation_marker" PARAMETERS k_height = r_dia, \
                    k_lenb = r_lenb,
                    k_lena = r_lena,
                    pen_text = pen_marker,
                    pen_symbol = pen_marker,
                    pen_fill = pen_marker,
                    type_fill = IND(fill, "zone_hider_fill"),
                    tfont = tfont,
                    w_regulations = w_regulations,
                    d_regulations = "",
                    s_regulations = "",
                    kaj_door_ident = kaj_door_ident
    
    endif
    
    del 1
    end
    
    !_____________________________________________________________

    2Dスクリプト(ドア用)

    FRAGMENT2 all, 1
    
    kaj_door_ident = 1
    
    !______________________________  Markers  ____________________
    
    un_id=1000
    
    shxx=0
    xxx = REQUEST ("WINDOW_DOOR_SHOW_DIM", "", shxx)
    
    add2 0, k_
    
    IF shxx = 1 and key_mark_flag = 1 then
    
        !____________________________ Symbol marker __________________
        
        !************************** hotspot **************************
    
            !********** circle center
            !***** circle center X
            hotspot2 -1,k_lena,un_id,k_lenb,3
            un_id=un_id+1
            hotspot2 0,k_lena,un_id,k_lenb,1+128
            un_id=un_id+1
            hotspot2 k_lenb,k_lena,un_id,k_lenb,2
            un_id=un_id+1
            
            !***** circle center Y
            hotspot2 k_lenb,-1,un_id,k_lena,3
            un_id=un_id+1
            hotspot2 k_lenb,0,un_id,k_lena,1+128
            un_id=un_id+1
            hotspot2 k_lenb,k_lena,un_id,k_lena,2
            un_id=un_id+1
    
            !********** circle radius
            !***** left
            hotspot2 k_lenb+1, k_lena, un_id, k_dia, 3
            un_id = un_id+1
            hotspot2 k_lenb, k_lena, un_id, k_dia, 1+128
            un_id = un_id+1
            hotspot2 k_lenb-k_dia, k_lena, un_id, k_dia, 2
            un_id=un_id+1
            !***** right
            hotspot2 k_lenb-1, k_lena, un_id, k_dia, 3
            un_id = un_id+1
            hotspot2 k_lenb, k_lena, un_id, k_dia, 1+128
            un_id = un_id+1
            hotspot2 k_lenb+k_dia, k_lena, un_id, k_dia, 2
            un_id=un_id+1
    
        if  detail_mode # 2 then                                            !===JX2
            elong = 0
            if j_shape=3 then elong = C_
        else
            elong = - fgd
    
            if d_s_s=2 and j_shape=2 then elong = j_d + p10
            if d_s_s=4 and j_shape=2 then elong = j_d + p10
            if d_s_s=4 and j_shape=3 then elong = j_d + p10 + p3 - dd1
    
        endif
        
            !************************************************* marker
    
            if key_mark_type = "タイプ1" then
                    marker_type = 0
            else
                    marker_type = 1
            endif
    
        CALL "AC80_symbol_marker" PARAMETERS k_dia = k_dia, \
            k_line = k_line,
            k_lenb = k_lenb,
            k_lena = k_lena,
            pen_text = pen_marker,
            pen_symbol = pen_marker,
            pen_fill = pen_marker,
            type_fill = IND(fill, "zone_hider_fill"),
            tfont = tfont,
            w_type_name = "",
            d_type_name = d_type_name,
            s_type_name = "",
            type_no = type_no_tx,
            kaj_door_ident = kaj_door_ident,
            globid = GLOB_ID,
            elong = elong,
            k_idflag = k_idflag,
            fill_flag=flag_zonehider,
                    marker_type = marker_type,
                    op_elv = GLOB_ELEVATION,
                    op_height = B
    
    endif
    
    !________________________ Regulation marker __________________
    
    
    if reg_mark_flag = 1 and d_regulations<>"未定" and d_regulations<>"法規制なし" then
    
            !************************** hotspot **************************
    
            !********** circle center
            !***** circle center X
            hotspot2 -1,r_lena,un_id,r_lenb,3
            un_id=un_id+1
            hotspot2 0,r_lena,un_id,r_lenb,1+128
            un_id=un_id+1
            hotspot2 r_lenb,r_lena,un_id,r_lenb,2
            un_id=un_id+1
            
            !***** circle center Y
            hotspot2 r_lenb,-1,un_id,r_lena,3
            un_id=un_id+1
            hotspot2 r_lenb,0,un_id,r_lena,1+128
            un_id=un_id+1
            hotspot2 r_lenb,r_lena,un_id,r_lena,2
            un_id=un_id+1
    
            !********** circle radius
            !***** left
            hotspot2 r_lenb+1, r_lena, un_id, r_dia, 3
            un_id = un_id+1
            hotspot2 r_lenb, r_lena, un_id, r_dia, 1+128
            un_id = un_id+1
            hotspot2 r_lenb-r_dia, r_lena, un_id, r_dia, 2
            un_id=un_id+1
            !***** right
            hotspot2 r_lenb-1, r_lena, un_id, r_dia, 3
            un_id = un_id+1
            hotspot2 r_lenb, r_lena, un_id, r_dia, 1+128
            un_id = un_id+1
            hotspot2 r_lenb+r_dia, r_lena, un_id, r_dia, 2
            un_id=un_id+1
    
        CALL "AC80_regulation_marker" PARAMETERS k_height = r_dia, \
            k_lenb = r_lenb,
            k_lena = r_lena,
            pen_text = pen_marker,
            pen_symbol = pen_marker,
            pen_fill = pen_marker,
            type_fill = IND(fill, "zone_hider_fill"),
            tfont = tfont,
            w_regulations = "",
            d_regulations = d_regulations,
            s_regulations = "",
            kaj_door_ident = kaj_door_ident
    
    endif
    
    del 1
    
    !_____________________________________________________________
  3. インターフェーススクリプトに以下のスクリプトを貼りつけます。

    インターフェーススクリプト

    ui_dialog "カスタム設定"
    
    !!********************** page1 ************************
    !!*****************************************************
    UI_PAGE 1
    
       ui_groupbox "キープラン設定",10,1,290,264
       ui_pict "key_01.tif",20,140,100,100,1
    
       ui_outfield "建具種類:",130,15,70,20
       ui_infield  "w_type_name" ,200,10,90,20
       
       ui_outfield "建具番号:"   ,130,35,70,20
       ui_infield "type_no"    ,200,30,90,20
    
       ui_outfield "枝番:"   ,130,55,70,20
       ui_infield "type_no_sub"    ,200,50,90,20
    
       ui_outfield "形式:"  ,130,75,70,20
       ui_infield "win_shape" ,200,70,90,20
    
       ui_outfield "法規制:"   ,130,95,70,20
       ui_infield "w_regulations"    ,200,90,90,20
    
       ui_outfield "法規制マーカー:"   ,130,115,70,20
       ui_infield "reg_mark_flag"    ,200,110,90,20
    
    
       ui_outfield "符号サイズ:",130,145,70,20
       ui_infield  "k_dia" ,200,140,90,20
       
       ui_outfield "引き出し線:"   ,130,165,70,20
       ui_infield "k_line"    ,200,160,20,20
    
       ui_outfield "ID表示:"   ,230,165,40,20
       ui_infield "k_idflag"    ,275,160,20,20
    
       ui_outfield "L1:"   ,130,185,70,20
       ui_infield "k_lena"    ,200,180,90,20
    
       ui_outfield "L2:"   ,130,205,70,20
       ui_infield "k_lenb"    ,200,200,90,20
    
       ui_outfield "L3:"   ,130,225,70,20
       ui_infield "k_lenc"    ,200,220,90,20
    
       ui_outfield "フォント:"   ,130,245,70,15
       ui_infield "tfont"    ,200,240,90,20
    
       ui_outfield "キープラン表示:"   ,25,95,70,20
       ui_infield "key_mark_flag"    ,100,90,20,20
    !--------------------------------------------JX3 S
       ui_outfield "スケールに連動",25,115,70,20
       ui_infield "scale_link_label", 100, 110, 20, 20
    !--------------------------------------------JX3 E
    !*************   
           ui_infield{2} "key_mark_type", 25,20,56,54,3,"keyplantype.tif",
           2,1,54,54,50,50,
           1,"タイプ1", 2,"タイプ2"
    !*************
    !ui_groupbox "断面設定", 160, 1, 150, 264
    !
  4. (ArchiCAD 14のみ)マスタースクリプトに以下のスクリプトを貼りつけます。

    マスタースクリプト

    !------------ KeyPlan No.+ sub no.
            for ii=10 to 1 step -1
                    if type_no<10**ii then no_len=ii
            next ii
            for ii=10 to 1 step -1
                    if type_no_sub<10**ii then no_len_sub=ii
            next ii
    
            if no_and_sub = "" then
                    if type_no_sub=0 then
                            type_no_tx = STR(type_no, no_len, 0)
                    else
                            type_no_tx = STR(type_no, no_len, 0) + "-" + STR(type_no_sub, no_len_sub, 0)
                    endif
            else
                    type_no_tx = no_and_sub
            endif
    
            parameters type_no_tx = type_no_tx
            lock "type_no_tx"
    !--------------------------------------------JX3 E
  5. 自作の建具番号ー枝番の入力は、「建具番号ー枝番」パラメータで設定します。

    • *建具表も考慮する場合、 「建具番号」を合わせて設定する必要があります。

    03.png

関連ページ

記事:

技術情報:

不具合解説:


カテゴリGDL

技術情報/カスタム建具をキープランに対応させる方法 (最終更新日時 2012-02-16 07:54:50 更新者 MichitakaKiriki)