AutoCAD Map 3D Developer

New Member
Posts: 2
Registered: ‎09-04-2012
Message 1 of 1 (163 Views)

CreateLabel method

163 Views, 0 Replies
10-09-2012 01:49 PM

No matter which way I approach using the CreateLabel method to place a free standing label I receive errors.

I have been using the CreateLink method for some time, and it works fine.


Any insights to this would be much appreciated.





(setq link-result (vlax-invoke-method objLinktemplate "CreateLabel" objKeyvalues objLabeltemplate nil))

; error: ActiveX Server returned an error: Type mismatch

(setq link-result (vlax-invoke-method objLinktemplate "CreateLabel" objKeyvalues labeltemplate-name nil))

; error: lisp value has no coercion to VARIANT with this type:  "POLE-NO"


(setq link-result

  (vlax-invoke-method objLinktemplate "CreateLabel" objKeyvalues (vlax-make-variant linktemplate-name

vlax-vbString) nil)

; error: lisp value has no coercion to VARIANT with this type:  #<variant 8 POLE>


(setq link-result (vl-catch-all-apply

  'caom-CreateLabel (list objLinktemplate obj-id objKeyvalues labeltemplate-name nil)


; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on unknown exception


(setq link-result (vl-catch-all-apply
  'caom-CreateLink (list objLinktemplate obj-id objKeyvalues)

;works fine

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community