Hi all,
I'm a little bit stuck with a problem, and hope that somebody could help me.
I am trying to add extended data to an object. Data which I'm trying to ad is three real values in list 1010. My extended data suppose too look like this:
(-3 ("dicra" (1000 . "data") (1002 . "{") (1010 100.0 0.0 50.0) (1002 . "}"))))
The problem is, when I'm trying to add extended data, I'm having problem with list 1010, usually I was adding list 1005 (handle) instead 1010.
Routine which I'm usually using is with vla-set-xdata, and I was making safearray of lists, something like this:
(setq satyp (vlax-make-safearray vlax-vb-integer '(0 . 4))) (setq saval (vlax-make-safearray vlax-vbVariant '(0 . 4))) (vlax-safearray-fill satyp (1001 1000 1002 1010 1002)) (vlax-safearray-fill saval ("dicra" "data" "{" (100.0 0.0 50.0) "}")) (vla-setxdata vobj satyp saval)
With 1005 and handle value it works fine.
If anyone knows what the problem is, I would be grateful for your help.
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
Something like this perhaps.
(setq satyp (vlax-make-safearray vlax-vbinteger '(0 . 4))) (vlax-safearray-fill satyp '(1001 1000 1002 1010 1002)) (setq ptarr (vlax-make-safearray vlax-vbDouble '(0 . 2))) (vlax-safearray-fill ptarr (list 100.0 0.0 50.0)) (setq saval (vlax-make-safearray vlax-vbVariant '(0 . 4))) (vlax-safearray-fill saval (list "dicra" "data" "{" ptarr "}")) (vla-setxdata vobj satyp saval)
HTH
Henrique