Author Topic: ** Error: no function definition: VLA-GET-OBJECTID32 **  (Read 12668 times)

0 Members and 1 Guest are viewing this topic.

KuoTze

  • Mosquito
  • Posts: 7
** Error: no function definition: VLA-GET-OBJECTID32 **
« on: April 01, 2014, 08:32:17 AM »
i work in AutoCad 2015 and run "LeeMAC's CountV1-3.lsp" but it error and msg is ** Error: no function definition: VLA-GET-OBJECTID32 **

How can Fix it ......

Sorry i English is not good to say ~~ please forgive ~~  :embarrassed:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #1 on: April 01, 2014, 08:49:40 AM »
The function is obsolete.
I'm not sure how or why it is being used.

Can you test/try the code using VLA-GET-OBJECTID
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

KuoTze

  • Mosquito
  • Posts: 7
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #2 on: April 01, 2014, 09:04:13 AM »
 :embarrassed:

i try to fix "vla-get-objetcid32 to vla-get-objetcid"

but can't work and Msg ** Error: ActiveX Server returned the error: unknown name: "SETBLOCKTABLERECORDID32" **

So .... i can't fix it ........
« Last Edit: April 01, 2014, 09:18:11 AM by KuoTze »

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #3 on: April 01, 2014, 09:18:06 AM »
Change the function to this:


Code: [Select]
(defun _getobjectid (doc obj)
    (if   (and (_is64bit) (= (type vla-get-objectid32) 'subr))
      (vla-get-objectid32 obj)
      (vla-get-objectid obj)
    )
  )

And change this portion of the code:
Code: [Select]
                (if (and (_is64bit)
                    (= (type vla-setblocktablerecordid32) 'subr)
                    )
                  'setblocktablerecordid32
                  'setblocktablerecordid
                )
Welcome to TheSwamp :)
« Last Edit: April 01, 2014, 09:24:28 AM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

KuoTze

  • Mosquito
  • Posts: 7
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #4 on: April 01, 2014, 09:27:26 AM »
 :-) thank ...

i paste your code to lisp it can't work and msg ** Error: ActiveX Server returned the error: unknown name: "SETBLOCKTABLERECORDID32" **

so ......................

Change the function to this:


Code: [Select]
(defun _getobjectid (doc obj)
    (if (and (_is64bit) (= (type vla-get-objectid32) 'subr))
      (vla-get-objectid32 obj)
      (vla-get-objectid obj)
    )
  )


Welcome to TheSwamp :)

KuoTze

  • Mosquito
  • Posts: 7
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #5 on: April 01, 2014, 10:00:55 AM »
thank your code

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(if (and (_is64bit)
                    (= (type vla-setblocktablerecordid32) 'subr)
                    )
                  'setblocktablerecordid32
                  'setblocktablerecordid
                )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



but ......

now error msg is :

Output [Table/File/Settings] <Exit>:

Specify Point for Table: ; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on exception
; error: Exception occurred: 0xC0000005 (Access Violation)

it can't work   :embarrassed:

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #6 on: April 01, 2014, 11:42:35 AM »
Give this version a try .. seems to be working on my computer. I noted the change in the header.




Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

KuoTze

  • Mosquito
  • Posts: 7
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #7 on: April 01, 2014, 12:32:32 PM »
Thank you so much  ...........

Count1.31-RJP can work

Thank you so much  ...........

 :lmao: :lmao: :lmao:

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #8 on: April 01, 2014, 12:34:31 PM »
Glad to help  :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #9 on: April 01, 2014, 06:05:26 PM »
Many thanks Ron -
I don't have a 64-bit system on which to test the program, so I am incredibly grateful for your assistance.

Lee

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #10 on: April 01, 2014, 06:10:34 PM »
The function is obsolete.

Hi Kerry,

I wasn't aware that this function had become obsolete in 2015.
Thank you for the information.

Lee

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #11 on: April 01, 2014, 09:04:40 PM »
It was marked Obsolete in the 2014 Help. I can't confirm 2015 yet.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #12 on: April 01, 2014, 09:29:57 PM »
Many thanks Ron -
I don't have a 64-bit system on which to test the program, so I am incredibly grateful for your assistance.

Lee


Anytime Lee :) .. you've helped me a ton.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #13 on: April 01, 2014, 09:31:18 PM »
It was marked Obsolete in the 2014 Help. I can't confirm 2015 yet.


Installed 2015 a week ago and that function is gone.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Hugo

  • Bull Frog
  • Posts: 422
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #14 on: April 02, 2014, 12:38:02 AM »
Hallo Lee

Here I have ever asked is that no longer work in 2015.  :-D

Hier habe ich schon mal gefragt das das nicht mehr funktionieren wird in 2015.


http://www.theswamp.org/index.php?topic=33654.msg513336#msg513336

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #15 on: April 10, 2014, 01:43:49 PM »
Give this version a try .. seems to be working on my computer. I noted the change in the header.

Ron -

As noted, I unfortunately don't have access to a 64-bit system to test, so I was curious: based on your modifications to the code, does the setblocktablerecordid32 accept a string representation of the 64-bit object ID (as returned by the getobjectidstring method)?

Also, why is the (= (type vla-get-objectid32) 'subr) test not sufficient to cater for 2014 onwards?

Many thanks,

Lee

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #16 on: April 10, 2014, 03:02:23 PM »
Lee,


From my testing, the setblocktablerecordid32 chucks a wobbly with the x64 objectID string.

Quote
_$
_1$
'(vlax-invoke #<VLA-OBJECT IAcadTable 000000002e0bd7f8> SETBLOCKTABLERECORDID32 2 0 "140700197868736" :vlax-true)
_1$
** Error: Out of present range **; reset after error


This test is fine (= (type vla-get-objectid32) 'subr) ... perhaps the function below will suffice :)

Code: [Select]

(defun _getobjectid (doc obj)
  (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))
    (if (= (type vla-get-objectid32) 'subr)
      (vla-get-objectid32 obj)
      (vlax-invoke-method (vla-get-utility doc) 'getobjectidstring obj :vlax-false)
    )
    (vla-get-objectid obj)
  )
)


HTH.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #17 on: April 12, 2014, 08:37:46 AM »
Many thanks Ron  :-)

Rabbit

  • Guest
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #18 on: April 24, 2014, 06:12:41 PM »
So will adding Ron's routine and using (_getobjectid docblocks a) instead of (vla-get-objectid32 a) in my routine below work?

Code: [Select]
(defun _getobjectid (doc obj)
    (if (and (_is64bit) (= (type vla-get-objectid32) 'subr))
      (vla-get-objectid32 obj)
      (vla-get-objectid obj)
    )
  )

Code: [Select]
(setq My_block (cdr (assoc 2 (entget FreshInsertedBlock))))
      (setq docblocks (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))))
      (setq a (vla-item docblocks My_block))
      (setq BlockObjectID (vla-get-objectid32 a))

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #19 on: April 24, 2014, 06:44:59 PM »
Been a long week so I may be overlooking something, but this is the way my brain's working today:

Code: [Select]
(defun _GetObjectID ( object )
    (if vla-get-objectid32
        (defun _GetObjectID ( object ) (vla-get-objectid32 object))
        (defun _GetObjectID ( object ) (vla-get-objectid object))
    )
    (_GetObjectID object)
)

tl;dr: Test once, and only as much as is req'd.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #20 on: April 24, 2014, 07:21:30 PM »
If one prefers the obfuscated:

Code: [Select]
(defun _GetObjectID ( object )
    (eval
        (cons 'defun
            (cons '_GetObjectID
                (list '(object)
                    (list
                        (if vla-get-objectid32 'vla-get-objectid32 'vla-get-objectid)
                        'object
                    )
                )
            )       
        )
    )
    (_GetObjectID object)   
)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #21 on: April 24, 2014, 07:36:56 PM »
If one prefers the obfuscated:

< .. >

I'm sure there is one.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #22 on: April 24, 2014, 07:45:07 PM »
lolz
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Rabbit

  • Guest
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #23 on: April 25, 2014, 09:05:47 AM »
The "obfuscated" version worked great in 2012.  Since I don't have 2015, and I'm helping someone who does, I'll get back with you on if it works there.  Many thanks.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #24 on: April 25, 2014, 09:14:02 AM »
You're welcome and thanks for letting me know -- I wrote it under 2010 -- conceptually it should work for 2015 -- but it's merely a guess.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #25 on: April 25, 2014, 09:16:17 AM »
An aside -- is Rabbit the same person that used to post in the Take 5 forum with David Doane and crew a million years ago?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #26 on: April 25, 2014, 09:49:08 AM »
Another variant for fun (penned under 2011, appears to work fine):

Code: [Select]
(defun _GetObjectID ( object )
    (eval
        (list 'defun '_GetObjectID '(object)
            (list
                (if vla-get-objectid32 'vla-get-objectid32 'vla-get-objectid)
                'object
            )
        )
    )
    (_GetObjectID object)   
)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

owenwengerd

  • Bull Frog
  • Posts: 451
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #27 on: April 25, 2014, 10:21:56 AM »
An aside -- is Rabbit the same person that used to post in the Take 5 forum with David Doane and crew a million years ago?

Yes, and both are still posting. You should stop by and say "hello".

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #28 on: April 25, 2014, 10:27:24 AM »
Wow. Didn't know it was still active. Can you pm me the link Owen? Thanks so much for letting me know. tl;dr: I feelz old now.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #29 on: April 25, 2014, 11:19:28 AM »
FWIW .. Michael's version breaks Lee's code in AutoCAD 2015 x64. Don't have an x86 computer to test on.


(setq o (vlax-ename->vla-object (car (entsel))))
#<VLA-OBJECT IAcadLWPolyline 000000f2812dbb28>


MP_GETOBJECTID
1055


RJP_GETOBJECTID
"140694991308416"


Apparently vla-setblocktablerecordid will accept an integer or string.




Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #30 on: April 25, 2014, 11:26:02 AM »
Damn. I have to get AutoCAD 2015 installed. :police:

Thanks for letting me know Ron.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #31 on: April 25, 2014, 11:32:42 AM »
Glad to help  8)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #32 on: April 25, 2014, 11:36:41 AM »
Regardless that vla-setblocktablerecordid will accept a string ... given that vla-get-objectid returns an int aren't you tempted to return same from your alt?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #33 on: April 25, 2014, 02:13:07 PM »
Regardless that vla-setblocktablerecordid will accept a string ... given that vla-get-objectid returns an int aren't you tempted to return same from your alt?


That would probably be a good idea.


Would you know why (atoi "140694991308416") returns 2147483647 ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC


ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #35 on: April 25, 2014, 02:33:36 PM »
Would you know why (atoi "140694991308416") returns 2147483647 ?

Probably, because there are 16^8 integers...

Code: [Select]
Command: (fix (atof (rtos (/ (- (expt 16. 8) 1) 2))))
2147483647
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #36 on: April 25, 2014, 04:31:59 PM »
I'm not at my computer (road trip ftw) but my inclination would be to use read, anyone try that?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #37 on: April 25, 2014, 11:07:22 PM »
Read does not work either.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #38 on: April 26, 2014, 12:15:14 AM »
How about distof?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #39 on: April 26, 2014, 08:47:45 AM »
Distof returns the same value as read  :(

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #40 on: April 26, 2014, 09:17:43 AM »
Thanks for trying Ron.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #41 on: April 26, 2014, 11:16:50 AM »
As discussed previously, I believe the atoi method won't work as the integer conversion functions in AutoLISP are only compatible with 32-bit signed integers and the 64-bit method requires a Long rather than an Int.

This link seems to describe the changes made to the ActiveX API in 2015:

http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-6FEDBCCA-91D0-4782-AE5A-49BD4384FD8C

Though, its odd that the setblocktablerecordid method now accepts either a 32-bit integer or a string for 64-bit systems - certainly, this behaviour is not detailed in the documentation.

With these changes in mind, and to retain compatibility with earlier 64-bit systems, I would suggest perhaps:
Code: [Select]
(defun LM:objectid ( obj )
    (eval
        (list 'defun 'LM:objectid '( obj )
            (cond
                (   (not (wcmatch (getenv "PROCESSOR_ARCHITECTURE") "*64*"))
                   '(vla-get-objectid obj)
                )
                (   (= 'subr (type vla-get-objectid32))
                   '(vla-get-objectid32 obj)
                )
                (   (list 'vla-getobjectidstring (vla-get-utility (LM:acdoc)) 'obj ':vlax-false))
            )
        )
    )
    (LM:objectid obj)
)

(defun LM:acdoc nil
    (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object))))
    (LM:acdoc)
)

But unfortunately I don't have access to a 64-bit system for testing. :(
« Last Edit: April 26, 2014, 11:21:51 AM by Lee Mac »

chlh_jd

  • Guest
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #42 on: April 26, 2014, 03:37:20 PM »
Nice solution , Lee :-)
In my case : In Acad2011 64bit system , Object has two property about ID <ObjectID32> <ObjectID>
                   In Acad2015 64bit system , Object has only one ID <ObjectID>
Code: [Select]
(vl-load-com)
(defun _ObjectID  (OBJ / ID)
  (vl-catch-all-apply
    (function
      (lambda nil
(setq ID
       (vlax-get
obj
(quote objectid)))))) id)
;;For test
(_ObjectID (vlax-ename->vla-object (car (entsel))))

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #43 on: April 26, 2014, 03:47:06 PM »
Nice solution , Lee :-)

Thanks chlh_jd  :-)

In my case : In Acad2011 64bit system , Object has two property about ID <ObjectID32> <ObjectID>
                   In Acad2015 64bit system , Object has only one ID <ObjectID>

If I've understood the API change correctly, the objectid property in 64-bit versions < 2015 (maybe 2014 also?) will return an incorrect object ID, and the objectid32 property must be used instead for these systems.

Could anyone confirm whether the value returned by the objectid property in 64-bit 2015 can be used with the setblocktablerecordid method?


chlh_jd

  • Guest
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #44 on: April 26, 2014, 03:53:37 PM »
If I've understood the API change correctly, the objectid property in 64-bit versions < 2015 (maybe 2014 also?) will return an incorrect object ID, and the objectid32 property must be used instead for these systems.
Could anyone confirm whether the value returned by the objectid property in 64-bit 2015 can be used with the setblocktablerecordid method?

I has catch this case sometime in AutoCAD2011 , but didn't know when it come in correct , perhaps I'v update it or .Net Frame .


ronjonp

  • Needs a day job
  • Posts: 7526
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #45 on: April 28, 2014, 01:01:44 PM »
Nice solution , Lee :)

Thanks chlh_jd  :)

....

Could anyone confirm whether the value returned by the objectid property in 64-bit 2015 can be used with the setblocktablerecordid method?

Lee,
From my tests, you can feed setblocktablerecordid the INT value generated from (vla-get-objectid obj) but it does not generate the block preview in the table. The STRING value returned from (vlax-invoke-method (vla-get-utility doc) 'getobjectidstring obj :vlax-false) works ... strange.   :o 

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #46 on: April 28, 2014, 06:27:58 PM »
From my tests, you can feed setblocktablerecordid the INT value generated from (vla-get-objectid obj) but it does not generate the block preview in the table. The STRING value returned from (vlax-invoke-method (vla-get-utility doc) 'getobjectidstring obj :vlax-false) works ... strange.   :o

Cheers Ron - strange indeed.  :|

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ** Error: no function definition: VLA-GET-OBJECTID32 **
« Reply #47 on: April 28, 2014, 06:46:35 PM »
Thank you all for your respective work and the resulting informative thread, good read.

An aside and for the curious, the value returned by GetObjectIDString is not the same as the ObjectID but it is the same as an entity's ename converted from hex to decimal. Sorry if this is mentioned elsewhere -- if it was I've not seen it so I thought I'd mention it.   
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst