Paul,
What I mean by "discipline menu that's loaded" it that we have a largely
customized menu system with separate pull down menus for Structural,
Architectural, Civil, Fire Protection, etc.. The first letter of the layer
name indicates which discipline the layer belongs to. i.e.: sdi = Structural
DImension layer. I don't want to create all the layers listed previously,
I'd like it to search for any of them and if it isn't present, to create
that layer according to the discipline menu currently loaded.
"Paul Turvill" wrote in message
news:1B64162675DE8C8D81AEA1595A92C7C6@in.WebX.maYIadrTaRb...
Not sure what you mean by "according to the discipline menu that's loaded,"
but here's a quick-and-dirty method that will create each of the layers you
mention if they don't already exist.
(defun C:MakeDebisLayers ( )
(foreach x '("SDI" "CDI" "ADI" "EDI" "PDI" "FDI")
(if (not (tblsearch "layer" x))
(command "._-layer" "_n" x "")
)
)
)
In fact you could even skip the (if (not (tblsearch ...))) business and
simply use the following:
(defun C:MakeDebisLayers ( )
(foreach x '("SDI" "CDI" "ADI" "EDI" "PDI" "FDI")
(command "._-layer" "_m" x "")
)
)
___
"Debi Olson" wrote in message
news:9A55ED78484CF750C3BE350F88DE3F12@in.WebX.maYIadrTaRb...
> Can someone please explain to me how table search is used to the best
> effect? For example, I want to check for a specific layer made up of three
> letters, but the first letter can be different, such as SDI, CDI, ADI,
EDI,
> PDI, FDI. If that layer isn't there, I'd like to create the layer
according
> to the discipline menu that's loaded. (Hence the S, C, A etc.) Then I want
> to build a routine from there.
>
> I'm learning how to do this so I'd rather have guidance and a little
> patience, than to have someone totally do it for me. I would appreciate
any
> and all help. Any body care to get me started?
>
> TIA,
> Debi
>
>