Author Topic: Undocumented function VLR-DOCUMENT usage:  (Read 2954 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
Undocumented function VLR-DOCUMENT usage:
« on: November 22, 2005, 10:10:52 AM »
Not anymore and for those doing some reactors code:

We can use VLR-DOCUMENT to get the active document by passing any reactor object.

Code: [Select]
(defun test (reactor params)
  (alert "begin close"))

(setq reactor (vlr-dwg-reactor "test" '((:vlr-beginclose . test))))

(setq doc (vlr-document reactor))

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #1 on: November 22, 2005, 10:17:57 AM »
Interesting, thank you Luis.

I suspect you'll detail vlr-pers-activate and vlr-pers-dictname next.

:twisted:
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #2 on: November 22, 2005, 10:25:21 AM »
If I had 2006 here I'd flag the undocumented vlr functions for said version. Kerry's watchin', maybe he will.

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

LE

  • Guest
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #3 on: November 22, 2005, 10:28:10 AM »
Interesting, thank you Luis.

I suspect you'll detail vlr-pers-activate and vlr-pers-dictname next.

:twisted:

The usage[signature] for VLR-PERS-DICTNAME is:

_$ (vlr-pers-dictname)
"VL-REACTORS"

It returns the dictionary name Visual Lisp use to keep the persistent reactors

Code: [Select]
$ (vlr-pers-dictname)
"VL-REACTORS"
_$ (vlr-pers reactor)
#<VLR-DWG-Reactor>
_$ (setq dict (dictsearch (namedobjdict) (vlr-pers-dictname)))
((-1 . <Entity name: 7ef59e98>) (0 . "DICTIONARY") (5 . "8B") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7ef59c60>) (102 . "}") (330 . <Entity name: 7ef59c60>) (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "$DOC$") (350 . <Entity name: 7ef59ea8>))
_$ (vlr-pers-list)
(#<VLR-DWG-Reactor>)

Let me see what vlr-pers-activate does.... if I can....

LE

  • Guest
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #4 on: November 22, 2005, 10:37:11 AM »
OK, I think I know what vlr-pers-activate does:

I have two persistent reactors "reactor" and "reactor1"
Code: [Select]
(defun test1 (reactor params)
  (alert "test"))

(setq reactor1 (vlr-editor-reactor "editor" '((:vlr-commandended . test1))))

(vlr-pers reactor1)

Now if I pass any of the reactors it will return the active ones:

Code: [Select]
$ (vlr-pers-activate reactor)
(#<VLR-Editor-Reactor> #<VLR-DWG-Reactor>)
_$ (vlr-pers-activate reactor1)
(#<VLR-Editor-Reactor> #<VLR-DWG-Reactor>)

LE

  • Guest
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #5 on: November 22, 2005, 10:41:59 AM »
Code: [Select]
$ (vlr-pers-activate reactor)
(#<VLR-Editor-Reactor> #<VLR-DWG-Reactor>)
_$ (vlr-pers-activate reactor1)
(#<VLR-Editor-Reactor> #<VLR-DWG-Reactor>)

And just to compare that list with the one returned from:

Code: [Select]
_$ (vlr-reactors)
((:VLR-DWG-Reactor #<VLR-DWG-Reactor>) (:VLR-Editor-Reactor #<VLR-Editor-Reactor>))
_$

LE

  • Guest
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #6 on: November 22, 2005, 10:49:29 AM »
I see....  what it does is very similar to VLR-REACTORS function

So if there are some persistent reactors it can be call like this and return the list of pers active reactors
Code: [Select]
_$ (vlr-pers-activate)
(#<VLR-Editor-Reactor> #<VLR-DWG-Reactor>)
_$

Code: [Select]
$ (vlr-pers-activate reactor)
(#<VLR-Editor-Reactor> #<VLR-DWG-Reactor>)
_$

LE

  • Guest
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #7 on: November 22, 2005, 10:55:15 AM »
Now, it can be useful when we required to get the resultant persistant reactors, in example I have two persistent ones, and then I release one of them and turn it into transient reactor and I want to know how many persistent reactors are left:

Code: [Select]
_$ (vlr-pers-release reactor) ; <<<< here I turn one persistant into a transient
#<VLR-DWG-Reactor>
_$ (vlr-pers-activate reactor) ; <<<< I pass the transient one to the possible pers active ones....
(#<VLR-Editor-Reactor>) ;<<<< here is just returning the left persistent
_$

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Undocumented function VLR-DOCUMENT usage:
« Reply #8 on: November 22, 2005, 11:24:33 AM »
Good stuff Luis, thanks for taking the time to investigate and share.

Subtitle: No time to look at this right now but glad it will be here when I do.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst