Jump to content

vlax-ldata-get and vlax-ldata-put


wimal

Recommended Posts

vlax-ldata-get and vlax-ldata-put this commands are not working in some auto cad

2009 version (vl-registry-read & write function is working). But same commands are working in version 2006 in same P.C

Please can you help?:(

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • BlackBox

    8

  • Lee Mac

    7

  • wimal

    6

  • Tharwat

    1

Top Posters In This Topic

Consider stepping through your code (F8?) in VLIDE to see where your code breaks. Also verify that the dictionary, key, etc. exist.

 

(vlax-ldata-get [i]dict [/i][i]key[/i][i] [default-data] [/i][i][private][/i])

Link to comment
Share on other sites

That is correct... look a little more closely at your code. :wink:

 

When I run following code

(vlax-ldata-[color=blue]get[/color][color=red][b]t[/b][/color] "CADGROUPdict" "5")

; error: no function definition: VLAX-LDATA-GET

Link to comment
Share on other sites

You will first need to load the Visual LISP Extensions by evaluating the vl-load-com function.

 

Type at the command-line (or in the Visual LISP Console):

 

(vl-load-com)

 

This only needs to be called once per session.

 

I recommend you include this line in your ACADDOC.lsp

Link to comment
Share on other sites

vlax-ldata-get and vlax-ldata-put this commands are not working in some auto cad

2009 version (vl-registry-read & write function is working).

 

You will first need to load the Visual LISP Extensions by evaluating the vl-load-com function.

 

Lee, note the working functions in the OP, vl-load-com is not the issue here... perhaps the typo noted in my previous post is? :unsure:*Shrug*

Link to comment
Share on other sites

Lee, note the working functions in the OP, vl-load-com is not the issue here... perhaps the typo noted in my previous post is? :unsure:*Shrug*

 

Good point, but note that not all VL functions require (vl-load-com)...

Link to comment
Share on other sites

Good point, but note that not all VL functions require (vl-load-com)...

 

I honestly did not know that (aside from vl-load-com itself)... As I too use ACADDOC.lsp to load the VL library, I guess I never really noticed. Thanks for that lil' nugget, Lee! :beer:

Link to comment
Share on other sites

SORRY MY code was

(vlax-ldata-get "CADGROUPdict" "dot")

Anyway I will follow your valuable advises.

 

No worries; did Lee's suggestion of invoking (vl-load-com) correct the issue...?

Link to comment
Share on other sites

I honestly did not know that (aside from vl-load-com itself)... As I too use ACADDOC.lsp to load the VL library, I guess I never really noticed. Thanks for that lil' nugget, Lee! :beer:

 

You're welcome :thumbsup:

 

To clarify:

 

Function           Requires (vl-load-com)?
------------------------------------------
vlax-*             YES
vla-*              YES
vlr-*              YES
vl-*               NO

 

I think there are some exceptions, for example, I don't think vlax-for requires vl-load-com, but then you cannot access the Object Model without vl-load-com, so Collections are inaccessible. Similarly, I think some others such as vlax-add/remove-cmd don't require it.

Link to comment
Share on other sites

Very neat, Lee... Very neat indeed. :geek:

 

Thanks :)

 

You spurred me to take this one step further to provide a definitive list...

 

Ensure (vl-load-com) has not yet been called in the session (i.e. temporarily rename your ACADDOC.lsp).

 

Then run the following program:

 

(defun c:VL-Independent ( / file filename )
   
   (setq filename (vl-filename-mktemp nil (getvar 'DWGPREFIX) ".txt"))
   (if (setq file (open filename "w"))
       (progn
           (foreach sym
               (acad_strlsort
                   (vl-remove-if-not
                       (function (lambda ( sym ) (wcmatch (strcase sym) "VL*")))
                       (atoms-family 1)
                   )
               )
               (write-line sym file)
           )
           (close file)
           (startapp "notepad" filename)
       )
   )
   (princ)
)

Returned is a list of all VL functions that do not require (vl-load-com)

Link to comment
Share on other sites

First, great usage of both atoms-family, and vl-filename-mktemp, Lee - ten points to Gryffindor house. :P

 

Here's the list I cam up with for both Civil 3D 2011, and 2012:

 

VL-ACAD-DEFUN
VL-ACAD-UNDEFUN
VL-ARX-IMPORT
VL-BB-REF
VL-BB-SET
VL-BT
VL-BT-OFF
VL-BT-ON
VL-CATCH-ALL-APPLY
VL-CATCH-ALL-ERROR-MESSAGE
VL-CATCH-ALL-ERROR-P
VL-CMDF
VL-CONSP
VL-DIRECTORY-FILES
VL-DOC-EXPORT
VL-DOC-IMPORT
VL-DOC-REF
VL-DOC-SET
VL-EVERY
VL-EXIT-WITH-ERROR
VL-EXIT-WITH-VALUE
VL-FILE-COPY
VL-FILE-DELETE
VL-FILE-DIRECTORY-P
VL-FILE-RENAME
VL-FILE-SIZE
VL-FILE-SYSTIME
VL-FILENAME-BASE
VL-FILENAME-DIRECTORY
VL-FILENAME-EXTENSION
VL-FILENAME-MKTEMP
VL-GET-RESOURCE
VL-INFP
VL-INIT
VL-LIST->STRING
VL-LIST-EXPORTED-FUNCTIONS
VL-LIST-LENGTH
VL-LIST-LOADED-VLX
VL-LIST*
VL-LOAD-ALL
VL-LOAD-COM
VL-LOAD-REACTORS
VL-MEMBER-IF
VL-MEMBER-IF-NOT
VL-MKDIR
VL-NANP
VL-POSITION
VL-PRIN1-TO-STRING
VL-PRINC-TO-STRING
VL-PROPAGATE
VL-REGISTRY-DELETE
VL-REGISTRY-DESCENDENTS
VL-REGISTRY-READ
VL-REGISTRY-WRITE
VL-REMOVE
VL-REMOVE-IF
VL-REMOVE-IF-NOT
VL-SOME
VL-SORT
VL-SORT-I
VL-STRING->LIST
VL-STRING-ELT
VL-STRING-LEFT-TRIM
VL-STRING-MISMATCH
VL-STRING-POSITION
VL-STRING-RIGHT-TRIM
VL-STRING-SEARCH
VL-STRING-SUBST
VL-STRING-TRANSLATE
VL-STRING-TRIM
VL-SYMBOL-NAME
VL-SYMBOL-VALUE
VL-SYMBOLP
VL-UNLOAD-VLX
VL-VBALOAD
VL-VBARUN
VL-VLX-LOADED-P
VLARTS-INIT
VLAX-ADD-CMD
VLAX-FOR
VLAX-REMOVE-CMD
VLISP-DCLRES-LIST
VLISP-DCLRES-LOAD-DIALOG
VLISP-EXPORT-SYMBOL
VLISP-FASRES-LIST
VLISP-FASRES-LOAD
VLISP-IMPORT-EXSUBRS
VLISP-IMPORT-SYMBOL
VLISP-INIRES-LIST

Link to comment
Share on other sites

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