----------------------------------------------------------------------------
FLay - Force layer for selected commands (objects)
(C)2025, Arkance Systems CZ s.r.o.   www.arkance.world  www.cadforum.cz
----------------------------------------------------------------------------

The FLay utility (reactor) automatically sets layers for drawing objects
created with specific commands. The settings are loaded from the FLAY.TAB
definition file. 
Using FLay you can put all newly created Texts, Dimensions, Hatches etc. or
specific blocks to the predefined layer names. If the layer does not exist,
it will be created.

Usage:
Load the FLay utility (e.g. with the APPLOAD command) and start the FLAY
command. Prepare (edit) the FLAY.TAB text file and make sure it is stored in
a folder searched in AutoCAD support paths.

The FLAY (FLayOn and FLayOff) commands enable and disable the command reactor.
Reactor is on by default.

The FLAYSUP1 disables FLAY reaction just for the next 1 command (which would
fire layer-switch reaction otherwise). Sets the FL:SUPPRESS1 variable.


Format of FLAY.TAB
The FLAY.TAB is a text file. The layers are defined on lines starting with an
asterisk ("*"). The next line defines the list of all drawing commands or
blocks which will be automatically redirected to this layer:

* layer_name [layer_color]
command1 command2 command3 @blockname1 @blockname2...

where:
layer_name - the name of the layer to be used (use "My name" for multiwords)
layer_color - (optional) color to be used for the newly created layer
command1 command2 - English command names to be redirected to that layer
@blockname - block names which will be inserted to that layer (wcmatch mask)
 (if you have block names with spaces, use "?": @MyBlock?withSpaces)

Example of the FLAY.TAB file (new arcs and circles will go to the ROUND layer):
* ROUND
ARC CIRCLE SPLINE


Notes:
You can list the currently loaded definitions using the "FLAY?" command.
Since V2.1 you can use FLay also for LISP commands (e.g. C:TCIRCLE) - you
will need to enable this with the LISP variable:
(setq FL:LISPREACTOR T)
before loading FLAY.VLX or before calling FLAYON.

You can select an alternative FLAY.TAB file by setting the FL:FLAYTAB
LISP variable or using the interactive command "FLAY!" (reacts to the FILEDIA 
variable - either dialog or commandline, reloads the table).
Example: 
(setq FL:FLAYTAB "X:\\mytables\\FLAY2.TAB")(FL:LoadTable)
or just:
(setvar "FILEDIA" 0)
FLAY! X:\\mytables\\FLAY2.TAB
(setvar "FILEDIA" 1)

History:
V2.6: transparent orthomode
V2.5: bug fix
V2.4: block name fix, reload in dialog (and fix for AutoCAD 2023.1 bug)
V2.3: added block option (individual blocks)
V2.2: added FLAYSUP1 command - suppresses next reaction (disable FLAY temporarily)
V2.1: added support for LISP commands - disabled by default!
V2.0: use "(setq FL:STAYSWITCHED T)" to keep the last forced layer current
V1.10: duplicate commands checking, "." and "_" in command names skipped
V1.9: dialog version of FLAY added, command checking
V1.7: layer name pre-check
V1.6: multi word layer names supported
V1.5: added support for dash commands -COMMAND


License: FLAY is a free utility by ARKANCE, do
not publish it online on other than ARKANCE's
web servers, do not sell, lend or exchange it.

----------------------------------------------------
Contact:
Arkance Systems CZ s.r.o.
Libalova 1, 140 00 Praha, Czech Republic
info.cz@arkance.world   www.arkance.world   www.cadforum.cz



----------------------------------------------------------------------------
FLay - Force Layer - vynut hladinu pro zadan pkazy (objekty)
(C)2025, Arkance Systems CZ s.r.o.   www.arkance.world  www.cadforum.cz
----------------------------------------------------------------------------

Aplikace (reaktor) FLay automaticky nastavuje hladiny pro vkresov objekty
vytven zadanmi pkazy. Nastaven jsou natna z defininho souboru
FLAY.TAB.
Pomoc FLay mete umstit vechny nov vytven texty, kty, rafy atd. nebo
bloky do peddefinovanch hladin. Pokud hladina neexistuje, je automaticky
vytvoena.

Pouit:
Natte aplikaci FLay (nap. pkazem APLTI) a spuste pkaz FLAY. Pipravte
si (upravte) textov soubor FLAY.TAB a ujistte se, e je uloen v adresi
prohledvanm v rmci cest podprnch soubor AutoCADu (support paths).

Pkazy FLAY (FLayOn a FLayOff) zapnaj a vypnaj pkazov reaktor.
Reaktor je implicitn zapnut.

Pkaz FLAYSUP1 zake reaktor FLAY jen na jeden dal pkaz (kter by
jinak vyvolal pepnut hladiny). Viz promnn FL:SUPPRESS1.


Formt souboru FLAY.TAB
FLAY.TAB je textov soubor. Hladiny jsou definovny na dcch zanajcch
hvzdikou ("*"). Nsledujc dek pak definuje seznam pkaz, pro kter je
tato hladina pouita - tedy kter budou automaticky pesmrovny do dan
hladiny:

* layer_name [layer_color]
command1 command2 command3 @blockname1 @blockname2...

kde:
layer_name - nzev hladiny, kter bude pouita (vceslovn do uvozovek)
layer_color - (voliteln) barva pro nov vytvenou hladinu
command1 command2 - anglick nzvy pkaz, kter budou pesmrovvny do dan hladiny
@blockname - nzvy blok, kter budou vkldny dan hladiny (wcmatch maska)

Pklad souboru FLAY.TAB (nov oblouky a krunice pjdou do hladiny KULATE):
* KULATE
ARC CIRCLE SPLINE


Pozn.:
Aktuln naten definice mete vypsat pkazem "FLAY?".
Od verze V2.1 je mon pout FLay tak pro LISP pkazy (nap. C:TCIRCLE) - je
poteba povolit nastavenm LISP promnn:
(setq FL:LISPREACTOR T)
ped natenm FLAY.VLX nebo ped volnm FLAYON.


Mete zvolit alternativn soubor FLAY.TAB (tabulku) nastavenm LISP promnn
FL:FLAYTAB nebo pomoc pkazu "FLAY!" (respektuje nastaven FILEDIA, znovunate
tabulku hladin). Nap.:
(setq FL:FLAYTAB "X:\\mojetabulky\\FLAY2.TAB")(FL:LoadTable)
nebo jen:
(setvar "FILEDIA" 0)
FLAY! X:\\mojetabulky\\FLAY2.TAB
(setvar "FILEDIA" 1)


Licence: FLAY je bezplatn utilita pro zkaznky firmy ARKANCE,
nen dovoleno ji dle it, peprodvat nebo vymovat.


----------------------------------------------------
Kontakt:
Arkance Systems CZ s.r.o.
Libalova 1, 140 00 Praha, esk republika
info.cz@arkance.world  www.arkance.world  www.cadforum.cz
