VLX files can be configured to access data across different namespaces.
(vlax-ldata-put "mydict" "mykey" "Mumbo Dumbo") "Mumbo Dumbo" (vlax-ldata-get "mydict" "mykey") "Mumbo Dumbo"
(vl-doc-export 'ldataput) (vl-doc-export 'ldataget) (vl-doc-export 'ldataget-nilt) (defun ldataput () (princ "This is a test of putting private ldata ") (vlax-ldata-put "mydict" "mykey" "Mine! Mine! " T) ) (defun ldataget () (vlax-ldata-get "mydict" "mykey") ) (defun ldataget-nilt () (vlax-ldata-get "mydict" "mykey" nil T) )
(ldataput) This is a test of putting private ldata
Refer to the code defining ldataput: this function stores a string containing “Mine! Mine!”
(ldataget) "Mumbo Dumbo"
Notice that the data returned by ldataget is not the data stored by ldataput. This is because ldataget does not specify the private argument in its call to vlax-ldata-get. So the data retrieved by ldataget is the data set by issuing vlax-ldata-put in step 1.
(ldataget-nilt) "Mine! Mine!"
(ldataget-nilt) "Mine! Mine!"
This time the private data saved by ldataput is returned, because ldataget-nilt specifies the private argument in its call to vlax-ldata-get.
(vlax-ldata-get "mydict" "mykey" nil T) "Mumbo Dumbo"
The private argument is ignored when vlax-ldata-get is issued outside a separate-namespace VLX. If non-private data exists for the specified dict and key (as in this instance), that data will be retrieved.