Thanks guys! Works great!
Now I have another problem...well, not really a problem, just an annoyance because I like to keep my code clean. I am inserting a titleblock with 82 attributes in it, so I have the text for each attribute set as a variable (to make it easy to insert in multiple titleblocks).
Here is the command and it works great:
Code:
((= "BI" clientName)
(command "-insert" "J:/CAD/2010-Mechanical/Templates/P&ID Templates/Borders/birchcliff.dwg" "0,0,0" 1 "" "" i7
i6 i4 i3 i2 i1 i5 i9 i8 i26 i17g
i17f i17e i17d i17c i17b i17a i16g i16f i16e i16d
i16c i16b i16a i15g i15f i15e i15d i15c i15b i15a
i14g i14f i14e i14d i14c i14b i14a i13g i13f i13e
i13d i13c i13b i13a i12g i12f i12e i12d i12c i12b
i12a i11g i11f i11e i11d i11c i11b i11a i10g i10f
i10e i10d i10c i10b i10a i25b i25a i24b i24a i23b
i23a i22b i22a i21b i21a i20b i20a i19b i19a i18b
i18a))
I have 14 instances of the above code right now (14 different clients). Anyways, I was thinking something like this would clean it up, but it fails to use the list of attributes and use them when inserting the titleblock:
Code:
(setq inscmds (list i7
i6 i4 i3 i2 i1 i5 i9 i8 i26 i17g
i17f i17e i17d i17c i17b i17a i16g i16f i16e i16d
i16c i16b i16a i15g i15f i15e i15d i15c i15b i15a
i14g i14f i14e i14d i14c i14b i14a i13g i13f i13e
i13d i13c i13b i13a i12g i12f i12e i12d i12c i12b
i12a i11g i11f i11e i11d i11c i11b i11a i10g i10f
i10e i10d i10c i10b i10a i25b i25a i24b i24a i23b
i23a i22b i22a i21b i21a i20b i20a i19b i19a i18b
i18a))
((= "BI" clientName)
(command "-insert" "J:/CAD/2010-Mechanical/Templates/P&ID Templates/Borders/birchcliff.dwg" "0,0,0" 1 "" "" inscmds))