Lisp works in V23 stoped working in V24 - objectid32 property issue

aridzv
edited December 2023 in LISP Codes
Hi.
I have a lisp that put an attribute value in to a multileader with block.
with V24 It stop puting the attribute value to the Mleader block attribute,
and instand it is using the Mleader block default.
I attached here the lisp file and a sample drawing.
any help will be appreciated...

thanks,
aridzv.

Comments

  • Sorry, I can't answer your question, but mine may be a related LISP/ v24 issue. I can see you have an initget menu that runs through once on execution. I have some code with an initget/ menuloop that doesn't handle 2 of my menu items, whilst 2 other menu items work just fine.
  • @chris_yates
    Hi and thanks for the respond.
    I canceld the iniget and made to lisp set for fixed value but it didn't solve it.
    thanks anyway,
    aridzv.
  • ALANH
    edited December 2023
    A replacement for initget, can use in any code, Multi getvals & Multi toggles also available.

    (if (not AH:Butts)(load "Multi radio buttons.lsp")) ; loads the program if not loaded already
    ; you can reset default button to user pick 1
    (setq ans (ah:butts 1 "V" '("Please choose " "ORDER" "QUANTITY" "ITEMDESCRIPTION" " ITEMDESCRIPTIONHEB" )))



  • Hi @ALANH and thanks for the idea - I'll definitely give it a try!!
  • aridzv
    edited December 2023
    About the solution to the problem - Bricscd support solved it:

    1. Support team wrote that: "The issue appears to arise from the handling of the vla-get-objectid32 & vla-setblockattributevalue32 methods... The test for the existence of the objectid32 property and applicability of the setblockattributevalue32 method were necessary in earlier versions of AutoCAD during the transition from a 32-bit OS architecture to a 64-bit architecture - these functions were never required for BricsCAD (nevertheless, the use of such functions should not result in an error, and as such, we will investigate this issue internally)."

    2. the support team solved it this way:
    changing this code block:
                                   (if (vlax-property-available-p obj 'objectid32)
                                       (setq oid (vla-get-objectid32 obj))
                                       (setq oid (vla-get-objectid   obj))
                                   )
                                   (if (vlax-method-applicable-p ML 'setblockattributevalue32)
                                       (vla-setblockattributevalue32 ML oid val1)
                                       (vla-setblockattributevalue   ML oid val1)
                                   )
    to this:
                                       (setq oid (vla-get-objectid   obj))
                                       (vla-setblockattributevalue   ML oid val1)
    
    hope this will help others and many thanks to bricscad support team!!
    aridzv.
  • A bit of legacy code from Acad! This has been a useful thread. Thanks, everybody.