ActiveX functions, methods and properties

ActiveX method MenuLoad does not work!Why?

Comments

  • MenuGroups property is not available too in BriccsCad v8.2

  • Note!(1) Boolean Com functions return :vlax-true or :vlax-false instead 0 or -1 in Autocad

  • Hello, Yuriy,regarding Boolean COM functions with :vlax-true/false resp. 0/1 return values ...Can you give some sample code here - I guess you used Lisp code ?I would be glad to check and fix the problem.Many thanks in advance,and many greetings

  • this code is written in VB6:Public Function TestBoolean() as Boolean ' Do Something TestBoolean = TrueEnd Functioninside TestBooleanClass class modulecompiled in TestBooleanDll.dll (an ActiveX DLL)registeredand called within bricscad:(vl-load-com)(vlax-invoke-method (vlax-get-or-create-object "TestBooleanDll.TestBooleanClass"));return :vlax-trueThis seems not like a bug!Problem is to use autocad-based aplications (lisps) with bricscad.Because some of them are protected...

  • Hello, Yuriy,thanks for explnation ...I'm not yet sure wether I understood the problem corrrectly :(vlax-invoke-method(vlax-get-or-create-object "TestBooleanDll.TestBooleanClass")) The (vlax-invoke--method) should return :vlax-true resp. :vlax-false for Boolean results ...at least, I never saw any other example;there are undocumented functions (vlax-get) and (vlax-put) and (vlax-invoke) in Acad, LT + Bricscad, which always return "native Lisp data types" where ever possible => those functions do indeed return -1 or 0 instead of :vlax-true resp. :vlax-false.Or do you mean the return is wrong due to protected VB Dll - so your VB Dll is not properly loaded/activated, and then (vla-invoke-method) fails and returns bad values ?How does the code above works in Acad - it returns -1 and 0 ?Can you provide an unprotected Dll "TestBooleanDll.TestBooleanClass" so I can test here ?As such differences regarding Lisp have hghest priority ...Many thanks in advance !

  • I just reviewed your comments ... do you mean, some of your Lisp is protected and therefore the code fails under Bricscad ?As intended by us, even protected Lisp code should run in Bricscad, except *.vlx and *.fas which can not be loaded yet.However, if you have a little Lisp + VB Dll, this would be a great help !

  • Hello, Yuriy,thanks to your sample files you posted with support request 16670 I was able to reproduce the problem.The issue was with (vlax-invoke) ... in Acad, this is an undocumented, but meanwhile well.known variation of (vlax-invoke-method) function.The difference is, that (vlax-invoke-method) always returns the "correct" result from COM - meaning, the results are returned as COM data types : a BOOL is :vlax-false/true, a list is a Variant with SafeArray content etc.In opposite, (vlax-invoke) always tries to return "native" Lisp data types from COM result data types, if ever possible ...example : (vlax-invoke) returns 0/-1 instead of :vlax-false/true(vlax-invoke) returns a normal Lisp list, instead of Variant of SafeArraySo this exactly meets your results :-)Fortunately, this issue has been fixed a few weeks ago - and now (vlax-invoke) exactly provides the same results as Acad.so I assume, the fix will be included in one of next public Bricscad releases.Many greetingsTorsten

  • Note2(!)AddMText ActiveX method places MText entity with zero height.To avoid it may be used as listed below:

    (vla-put-Height (vla-addMText (vla-get-Block (vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object) ) )(vlax-3d-point(list 0.0 0.0 0.0))185.0 "This MText is result of an ActiveX test") 2.5)
  • Hello, Yuriy,many thanks for the new issue you found.I will forward this problem to related developer, so the .AddMText() method will be fixed to work as expected.Wish you a nice day-

  • Hello, World!The function 'vla-get-FullName returns different values in case of - new drawing is just created - template file name; - drawing is just opened - real filename of current drawing - drawing is just automatically saved - filename of autosaved copy of current drawing(vla-get-FullName (vla-get-ActiveDocument (vlax-get-acad-object) ))What does this behavior mean?This is in BC 9.1.7

This discussion has been closed.