Jump to content

Recommended Posts

Posted

Hello, i need help with following line

 

(setq intersection(vlax-invoke-method vla_obj_first.IntersectWith(vla_obj_second, acExtendOtherEntity)))

 

i keep getting 'no function definition: VLA_OBJ_SECOND'...

of course i have converted two selected lines in vla objects; vla_obj_first and second, before calling that line...

thanx

Posted

Try

(setq intersection (vlax-invoke-method vla_obj_first 'IntersectWith vla_obj_second acExtendOtherEntity))

 

Henrique

Posted

that seems to work, but i added this

 

(setq intersection (vlax-safearray->list
                    (vlax-invoke-method vla_obj_first 'IntersectWith vla_obj_second acExtendOtherEntity)))
 (princ  intersection)

 

to list that point, but i get 'bad argument type: safearrayp #'

how to list it?

Posted

(princ (vlax-safearray->list (vlax-variant-value intersection)))

 

 

EDIT:

Tomislav,

using,

(setq intersection (vlax-invoke vla_obj_first 'IntersectWith vla_obj_second acExtendOtherEntity))

will return a normal point list or nil if no intersection found...

 

Henrique

Posted

I FOUND IT

 

(setq intersection (vlax-safearray->list(vlax-variant-value
                    (vlax-invoke-method vla_obj_first 'IntersectWith vla_obj_second acExtendOtherEntity))))
 (princ  intersection)

 

THNX for help Henrique

Posted

posted in same time as you so haven't saw your answer and it's great...i didn't know you can shorten it like that...many thanks

Posted

You're welcome, Tomislav

Glad you got a solution.

 

 

Henrique

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...