Assgarth Posted June 29, 2011 Report Share Posted June 29, 2011 Witam, w jaki sposób poprawnie wywołać funkcję "vla-intersectwith"? (setq obj1 (vlax-ename->vla-object (car(entsel))) obj2 (vlax-ename->vla-object (car(entsel)))) ;sposób 1: (vlax-safearray->list (vlax-variant-value (vla-intersectwith obj1 obj2 0))) ;sposób 2: (vlax-safearray->list (vlax-variant-value (vla-intersectwith obj1 obj2 zcExtendNone))) żaden z powyższych sposobów nie działa i zwraca błąd typu: błąd: Zły typ argumentu Obiekty, które wskazuję to np. łuk i linia. Przykład zawarty w Pomocy ZwCAD, odnosi się tylko do VBA... pozdrawiam Quote Link to comment Share on other sites More sharing options...
kruszynski Posted June 29, 2011 Report Share Posted June 29, 2011 Wystarczy pominąć funkcję vlax-variant-value. vla-intersectwith zwraca safearray a nie variant Quote Link to comment Share on other sites More sharing options...
Assgarth Posted June 29, 2011 Author Report Share Posted June 29, 2011 Uhm... okey, działa. Dziękuję za informację - warto jednak zaznaczyć, że jest to różnica w stosunku do Visual Lisp w AutoCAD, gdzie "vlax-variant-value" jest wymagane, w przeciwnym przypadku program wygeneruje błąd... pozdrawiam Quote Link to comment Share on other sites More sharing options...
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.