Jump to content

HELP with wlax-invoke-method


Tomislav

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

(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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...