Here's a quick first attempt using LISP - this is not going to be as versatile as RText + Diesel are with XREFS.
Add a FIELD to your MText in PaperSpace, using the *C3dDataRefs* LispVariable (see image), and simply moving from Model to Layout after you do some work will update the FIELD (depending on your FIELDEVAL sysvar setting). If you need it updated after working through a Viewport in Layout, just REGEN. If this becomes a PITA, I can have the code regen automagically, but that adds some lag, so I thought I'd start with what's faster and go from there.
2017-11-18_14-24-08.png
Just be mindful that anyone without this LISP being loaded via AcadDoc.lsp (meaning loaded into each drawing at open), will not have the global variable dependency pictured above, because this isn't being saved in the drawing, and thus not have the correct FIELD information. Again, this can be saved to the drawing, but that adds some time for LISP to do, and so I went with speed over complexity (for now).
Another shortcoming, is that while MText typically sees "\P" as a carriage return for normal text string input, it does NOT evaluate that from a FIELD in kind - I had initially tried to include this in the global variable value, but it would not be recognized, so I opted for the format you'll see as an interim placeholder.
Here's the LISP, you can add it to you AcadDoc.lsp, or I'd recommend saving this to its own LISP file and just add a LOAD statement to same:
Code:
(vl-load-com)
(defun C3dDataRefs (/ dataReferences)
(vlax-for x (vla-get-block
(vla-get-layout
(vla-get-modelspace
(vla-get-activedocument (vlax-get-acad-object))
)
)
)
(if (and (vlax-method-applicable-p x 'isreferenceobject)
(= 1 (vlax-invoke x 'isreferenceobject))
)
(setq dataReferences
(cons
(strcat
(vl-catch-all-apply 'vla-get-name (list x))
":["
(vl-catch-all-apply 'vla-get-objectname (list x))
"] "
)
dataReferences
)
)
)
)
(setq *C3dDataRefs*
(if dataReferences
(apply 'strcat (reverse dataReferences))
"<none>"
)
)
)
;;;--------------------------------------------------------------------;
(defun DrefReactors:Start ()
(or *DrefReactor_Command*
(setq *DrefReactor_Command*
(vlr-command-reactor
"C3D DREF Command Reactor"
'(
(:vlr-commandWillStart . Callback:DrefReactor)
)
)
)
)
(C3dDataRefs)
(prompt "\n \n >> C3D DREF Reactor Loaded \n")
(princ)
)
(defun Callback:DrefReactor (rea cmd /)
(C3dDataRefs)
)
;;;--------------------------------------------------------------------;
(DrefReactors:Start)
Cheers