LoginSignup
0
0

More than 1 year has passed since last update.

Archicad レイヤー設定 xmlファイルの中身を見てみる

Posted at

検証環境

  • バージョン:Archicad 26 5002 JPN
  • テンプレート:Archicad26 テンプレート.tpl

はじめに

Archicadは属性設定を別のPLNファイルに受け渡すためにエクスポートすることができます。
ファイル形式はxmlなので、書き換えることで属性設定をいじることが可能です。

レイヤー設定の出力

  1. オプション > 属性設定 > 属性 を開く
    image.png
  2. レイヤーを選択し、右下のエクスポートボタンを押す
    image.png
  3. 適当なフォルダを選択するとxmlファイルがエクスポートされる
    image.png

中身を見てみる

適当なエディタでxmlファイルを開く
image.png
(画像はVSCode)

レイヤー名を変更してみる

レイヤー名らしきものを探してみる
「壁-躯体」というレイヤー名を探すと

<AttributeFile>
    <RegisteredAttributes>
        <Attributes Type="レイヤー">
            <Layer Idx="2" Name="壁-躯体">
                <Name>壁-躯体</Name>

ここに記述されているらしいことがわかる。
この壁-躯体を試しにWALL-STRという文字列に書き換えてみる。

<Layer Idx="2" Name="WALL-STR">
    <OdbObj Mv="2" Sv="0">
        <OdbRef>
            <guid>9F743904-4762-45CB-9494-E7898B34E732</guid>
        </OdbRef>
        <CreaTime>4199</CreaTime>
        <ModiTime>4199</ModiTime>
    </OdbObj>
    <Name>WALL-STR</Name>
    <Index>2</Index>
    <Flags/>
    <ModiTime>1467336944</ModiTime>
    <RegMemoTable MemoNumber="0" Mv="1" Sv="0"/>
    <ReadOnly>false</ReadOnly>
    <ConnectionClassId>1</ConnectionClassId>
</Layer>

名前をつけて保存し、Archicadの属性画面からインポートボタンを押す。
image.png
一致設定:「インデックスによる」
参照から書き換えて保存したxmlファイルを選択する
変更したWALL-STRの左のチェックを入れる(すべてにチェックを入れても良い)
インポートオプションを「上書き」にする
「インポート」を押す。
image.png
レイヤーを見ると「壁-躯体」レイヤーが「WALL-STR」レイヤーに書き換わっている
image.png

レイヤー名以外のレイヤー設定

image.png
image.png
① 拡張名はレイヤー名の後ろに「.」を挟んで記述される
② インデックス名(属性でのみ表示)
③ レイヤー表示/ロック/ワイヤーフレーム表示状態 を|で区切って記述。
 レイヤー表示/ロックなし/非ワイヤーフレームの場合はのみ記述される。
④ レイヤーの交差グループ番号

フォルダ

<AttributeFile>
    <Folders>
        <TypeRoot>
            <Folder Name="[フォルダ名称]">
                <Attribute Idx="[ID]"/>

に記述されている。
レイヤーインデックスが2と3のレイヤーが「デザイン」フォルダに含まれる場合は

<AttributeFile>
    <Folders>
        <TypeRoot>
            <Folder Name="デザイン">
                <Attribute Idx="2"/>
                <Attribute Idx="3"/>

となる

フォルダ移動

「デザイン」フォルダに含まれている「オペレータ」レイヤーを「ドキュメント」フォルダに移動してみる。

「オペレータ」レイヤーを探すと

<Layer Idx="25" Name="オペレータ">

とあるので、レイヤーインデックス25を移動する

変更前
	<Folders>
		<TypeRoot RefID="1279351090">
			<Folder Name="デザイン">
				<Attribute Idx="2"/>
				<Attribute Idx="3"/>
				<Attribute Idx="4"/>
				<Attribute Idx="5"/>
				<Attribute Idx="6"/>
				<Attribute Idx="7"/>
				<Attribute Idx="8"/>
				<Attribute Idx="9"/>
				<Attribute Idx="10"/>
				<Attribute Idx="11"/>
				<Attribute Idx="12"/>
				<Attribute Idx="25"/>
				<Attribute Idx="27"/>
				<Attribute Idx="28"/>
				<Attribute Idx="29"/>
				<Attribute Idx="30"/>
				<Attribute Idx="34"/>
				<Attribute Idx="35"/>
				<Attribute Idx="36"/>
				<Attribute Idx="37"/>
				<Attribute Idx="40"/>
				<Attribute Idx="41"/>
				<Attribute Idx="42"/>
			</Folder>
			<Folder Name="ドキュメント">
				<Attribute Idx="13"/>
				<Attribute Idx="14"/>
				<Attribute Idx="15"/>
				<Attribute Idx="16"/>
				<Attribute Idx="17"/>
				<Attribute Idx="18"/>
				<Attribute Idx="19"/>
				<Attribute Idx="20"/>
				<Attribute Idx="23"/>
				<Attribute Idx="24"/>
				<Attribute Idx="26"/>
				<Attribute Idx="38"/>
			</Folder>
変更後
	<Folders>
		<TypeRoot RefID="1279351090">
			<Folder Name="デザイン">
				<Attribute Idx="2"/>
				<Attribute Idx="3"/>
				<Attribute Idx="4"/>
				<Attribute Idx="5"/>
				<Attribute Idx="6"/>
				<Attribute Idx="7"/>
				<Attribute Idx="8"/>
				<Attribute Idx="9"/>
				<Attribute Idx="10"/>
				<Attribute Idx="11"/>
				<Attribute Idx="12"/>
				<Attribute Idx="27"/>
				<Attribute Idx="28"/>
				<Attribute Idx="29"/>
				<Attribute Idx="30"/>
				<Attribute Idx="34"/>
				<Attribute Idx="35"/>
				<Attribute Idx="36"/>
				<Attribute Idx="37"/>
				<Attribute Idx="40"/>
				<Attribute Idx="41"/>
				<Attribute Idx="42"/>
			</Folder>
			<Folder Name="ドキュメント">
				<Attribute Idx="13"/>
				<Attribute Idx="14"/>
				<Attribute Idx="15"/>
				<Attribute Idx="16"/>
				<Attribute Idx="17"/>
				<Attribute Idx="18"/>
				<Attribute Idx="19"/>
				<Attribute Idx="20"/>
				<Attribute Idx="23"/>
				<Attribute Idx="24"/>
				<Attribute Idx="26"/>
				<Attribute Idx="38"/>
				<Attribute Idx="25"/>
			</Folder>

Archicadにインポートすると、移動している
image.png

最後に

レイヤーの対照表をExcelなどで作って、Python等でxmlファイルを書き換えることで、設計ー施工でテンプレートが違う場合の置き換えや、海外にモデル作成を発注する場合の言語変換などが可能です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0