Ok, uncle.
I know you use vlax-ldata-put to put the raw data in:
(vlax-ldata-put
"SmartyPants"
"hello$stickto_free_version"
"(&VLO-C lisplet-permanent-data-handle hello"
)
But I couldn't register it to execute on startup (the above assumed a lisp file in the same directory as the file named hello.lsp).
So ... I examined the data and what appeared different was the flag value associated with group 91. In my non functioning data it had a value of 46 instead of 49. I tried brute force entmodding and it wouldn't take, so I tried a hacker's approach: make the data from scratch and mod to suit (ugly coding, forgive me):
(defun FooYoo ( lispPath / foo1 foo2 )
(defun *error* (x) (vl-bt))
(defun foo1 ( dict dictnametoadd )
(cond
(
(cdr
(assoc -1
(dictSearch
dict
dictnametoadd
)
)
)
)
( (DictAdd dict dictnametoadd
(EntmakeX
'( (0 . "DICTIONARY")
(100 . "AcDbDictionary")
)
)
)
)
)
)
(defun foo2 ( dict dictname lispName / ename ename2 data )
(DictAdd dict dictname
(setq ename2
(EntmakeX
(list
'(0 . "DICTIONARY")
'(100 . "AcDbDictionary")
'(280 . 0)
'(281 . 1)
(cons 3
(strcat
lispName
"$stickto_free_version"
)
)
(cons 350
(setq ename
(entmakex
(list
'(0 . "VLO-VL")
'(100 . "vlo_VL")
'(90 . -64512)
'(91 . 49)
'(92 . 0)
(cons 300
(strcat
"(&VLO-C "
"lisplet-permanent-data-handle "
"\""
lispName
"\")"
)
)
)
)
)
)
)
)
)
)
(setq data
(subst
(cons 330 ename2)
(assoc 330
(setq data
(entget ename)
)
)
data
)
)
(entmod
(append
(setq head
(reverse
(member
(assoc 5 data)
(reverse data)
)
)
)
(list
'(102 . "{ACAD_REACTORS")
(cons 330 ename2)
'(102 . "}")
)
(member (assoc 330 data) data)
)
)
(entmod
(subst
'(91 . 49)
(assoc 91
(setq data
(entget ename)
)
)
data
)
)
)
(foo2
(namedObjdict)
"SmartyPants"
(vl-filename-base lispPath)
)
(princ)
)
(FooYoo "hello")
Makes the very same data, and it will persist but damn, the 91 flag value refuses to be modded and it won't run on startup.
The Main dictionary (look for SmartyPants dictionary item) ---1 <Entity name: 7ef70c60>
0 DICTIONARY
330 <Entity name: 0>
5 C
100 AcDbDictionary
280 0
281 1
3 ACAD_COLOR
350 <Entity name: 7ef70e18>
3 ACAD_GROUP
350 <Entity name: 7ef70c68>
3 ACAD_LAYOUT
350 <Entity name: 7ef70cd0>
3 ACAD_MATERIAL
350 <Entity name: 7ef70e10>
3 ACAD_MLINESTYLE
350 <Entity name: 7ef70cb8>
3 ACAD_PLOTSETTINGS
350 <Entity name: 7ef70cc8>
3 ACAD_PLOTSTYLENAME
350 <Entity name: 7ef70c70>
3 ACAD_TABLESTYLE
350 <Entity name: 7ef70e70>
3 AcDbVariableDictionary
350 <Entity name: 7ef70db0>
3 SmartyPants <= Hello !!!!!!!!!!!!!!!!
350 <Entity name: 7ef70ea0>
The SmartyPants dictionary object:-1 <Entity name: 7ef70ea0>
0 DICTIONARY
5 8C
102 {ACAD_REACTORS
330 <Entity name: 7ef70c60>
102 }
330 <Entity name: 7ef70c60>
100 AcDbDictionary
280 0
281 1
3 hello$stickto_free_version
350 <Entity name: 7ef70e98>
The VLO-VL object entry (child of the dictionary object above).-1 <Entity name: 7ef70e98>
0 VLO-VL
5 8B
102 {ACAD_REACTORS
330 <Entity name: 7ef70ea0>
102 }
330 <Entity name: 7ef70ea0>
100 vlo_VL
90 -64512
91 46 <== bastard value, should be 49
92 0
300 (&VLO-C lisplet-permanent-data-handle "hello")
-- but I got this close.So ... let me out of my misery. Just kidding, I enjoyed the hacking.