TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: domenicomaria on May 25, 2021, 05:28:01 AM
-
I wrote an application that uses some modeless forms of Open DCL.
Every button, has its associated defun.
I need that this modeless form,
has to work in every open DWG, in every DOC.
So I need to PROPAGATE defuns.
A lot of defuns ... ! (more then 500 defuns !)
So I tried this :
(vl-propagate 'DEFUN-NAME)
but NOTHING HAPPENS !
I need to PROPAGATE a DEFUN , not a VARIABLE . . .
any suggestion ?
-
Every button, has its associated defun.
the button defines a function or the button calls a function?
-
the button defines a function or the button calls a function?
The defuns are defined onInitialize event.
When the form is shown.
Every button calls a function defined from a defun.
When the user clicks on that button, the associated defun is executed.
-
the button defines a function or the button calls a function?
The defuns are defined onInitialize event.
you may try (vl-load-all) and OnDocActivate event
-
you may try (vl-load-all) and OnDocActivate event
vl-load-all is good only the first time . . .
. . .
it is not easy to explain . . .
. . .
Defuns are redefined at run time frequently.
. . .
I cannot load all, all the time a defun is redefined . . .
. . .
When the user switches from
DIMENSIONs to TEXT UTILITIES[2]
all the 25 defuns associated to these 25 buttons,
are REDEFINED at RUN TIME.
. . .
All the time, have I to reload (all) every thing ?
. . .
Just to give you an idea, take a look to the attached images.
-
i see that initially you functions are strings
you can build a list of all those strings, then vl-propagate this list and then read-eval items from this list upon OnDocActivate event
-
i see that initially you functions are strings
you can build a list of all those strings, then vl-propagate this list and then read-eval items from this list upon OnDocActivate event
thank you
i will give it a try
-
Vovka thanks.
You always help me.
It works !
1- vl-load-all
2- an onDocActivated defun
3 - create a list of strings representing the code of all the run-time re-defined defuns
4 - vl-propagate this list of strings
5 - when the event onDocActivated happens, then mapcar, read , eval . . .
. . . if you come to Italy, I will offer you a case of beer. . .
we will drink it, you and my Ukrainian friend from Kharkiv (Харьков)
. . .
grazie
ciao
-
. . . if you come to Italy, I will offer you a case of beer. . .
we will drink it, you and my Ukrainian friend from Kharkiv (Харьков)
:smitten:
say 'hi' to him from Lutsk (Луцьк)
-
her
-
her
oops
then Salutala :)
-
@VovKa,
fast fingertips?
Tell us something from your IRT experiences...
Was it fun to write it?
How are your legs?