(vlax-create-object "ScriptControl") retuns nil

(vlax-create-object "ScriptControl") retuns nil

SAPER59
Advocate Advocate
1,119 Views
4 Replies
Message 1 of 5

(vlax-create-object "ScriptControl") retuns nil

SAPER59
Advocate
Advocate

I'm tryng to run a function that got from the web, to display an image in DCL but (vlax-create-object "ScriptControl") can not access and null object is returned

Working in Windows 10 64b

Any help about how to solve this will be thanks

 

0 Likes
Accepted solutions (1)
1,120 Views
4 Replies
Replies (4)
Message 2 of 5

dlanorh
Advisor
Advisor
I can't find the reference but the problem may be that this is only compatible with 32-bit systems.
Post the function.

I am not one of the robots you're looking for

0 Likes
Message 3 of 5

SAPER59
Advocate
Advocate

OK, thanks

0 Likes
Message 4 of 5

SAPER59
Advocate
Advocate

I forgot to post the function

 

 

(defun get_cb (/ scr txt) ;
(setq scr (vlax-create-object "ScriptControl"))
(vlax-put scr 'language "vbs")
(vlax-invoke-method
scr
'ExecuteStatement
"Set htmlfile = CreateObject(\"htmlfile\")
Text = htmlfile.ParentWindow.ClipboardData.GetData(\"text\")"
)
(setq txt (vlax-invoke-method scr 'eval "Text"))
(vlax-release-object scr)
txt
) ;_ end of defun

0 Likes
Message 5 of 5

ronjonp
Mentor
Mentor
Accepted solution

These get and set clipboard functions still work.