muthu123 Posted June 2, 2010 Posted June 2, 2010 Dear friends, The Following code is returns error in one of our systems in our concern and in all others are working fine. (vlax-safearray->list (vlax-variant-value (vla-getAttributes Blk_name))) yours, Muthu. Quote
Lee Mac Posted June 2, 2010 Posted June 2, 2010 Perhaps the block does not have attributes, a few ways to check (in all examples 'bObj' is a VLA Block Reference Object. ( 1 ) (vlax-invoke bObj 'GetAttributes) Will return nil if the block does not have attribs. ( 2 ) Check that the block has attributes first: (eq :vlax-true (vla-get-HasAttributes bObj)) ( 3 ) Check the upper bound of the first dimension of the safearray, a negative upper bound indicates an empty safearray. (< 0 (vlax-safearray-get-u-bound (vlax-variant-value (vla-getAttributes bObj)) 1 ) ) Lee Quote
muthu123 Posted June 3, 2010 Author Posted June 3, 2010 Lee Mac said: Perhaps the block does not have attributes, a few ways to check (in all examples 'bObj' is a VLA Block Reference Object. ( 1 ) (vlax-invoke bObj 'GetAttributes) Will return nil if the block does not have attribs. ( 2 ) Check that the block has attributes first: (eq :vlax-true (vla-get-HasAttributes bObj)) ( 3 ) Check the upper bound of the first dimension of the safearray, a negative upper bound indicates an empty safearray. (< 0 (vlax-safearray-get-u-bound (vlax-variant-value (vla-getAttributes bObj)) 1 ) ) Lee Dear lee, But the thing is the same drawing is working in all other systems. I don't know how to solve this?. Is there any change in Acad settings? Sincerly, Muthu. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.