Jump to content

Specifying a NULL object.


Lee Mac

Recommended Posts

here's what i tried se7en:

 

 

(setq acsp (vla-get-modelspace (vla-get-activedocument
       (vlax-get-acad-object)
       )))
;=>
;#<VLA-OBJECT IAcadModelSpace2 133ba2f4> 



(setq mtx (vlax-invoke
	     acsp 'AddMText '(1. 1. 0.) 0.0 "My_text")
       )
;=>
;#<VLA-OBJECT IAcadMText 13099764>



(vlax-invoke
   acsp
   'Addleader
   (apply 'append (list '(0. 0. 0.) '(1. 1. 0.)))
   mtx
   acLineWithArrow
) ;_ vlax-invoke
;=>
;#<VLA-OBJECT IAcadLeader 131a74e4>  ;;; ok







;;;now releasing mtx object





(vlax-release-object mtx)
;=>
;0


;;;inspecting mtx
;=>
;#<VLA-OBJECT 00000000> ;null object




;;;try again with a null object

(vlax-invoke
   acsp
   'Addleader
   (apply 'append (list '(0. 0. 0.) '(1. 1. 0.)))
   mtx
   acLineWithArrow
) ;_ vlax-invoke
;=>
;; error: null interface pointer: #<VLA-OBJECT 00000000>

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    8

  • Shawndoe

    4

  • Se7en

    3

  • VovKa

    3

Top Posters In This Topic

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