Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1010 - extended data

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
dicra
328 Views, 3 Replies

1010 - extended data

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.

 

 

 

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: dicra

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

 

EESignature

Message 3 of 4
dicra
in reply to: hmsilva

Thank you Henrique, this was really helpful.

I can't put list in safearray...

 

Message 4 of 4
hmsilva
in reply to: dicra

You're welcome, dicra
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost