wimal Posted December 6, 2011 Share Posted December 6, 2011 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? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 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]) Quote Link to comment Share on other sites More sharing options...
wimal Posted December 6, 2011 Author Share Posted December 6, 2011 When I run following code (vlax-ldata-put "CADGROUPdict" "5") ; error: no function definition: VLAX-LDATA-PUT Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 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 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 6, 2011 Share Posted December 6, 2011 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 Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 vlax-ldata-get and vlax-ldata-put this commands are not working in some auto cad2009 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? *Shrug* Quote Link to comment Share on other sites More sharing options...
wimal Posted December 6, 2011 Author Share Posted December 6, 2011 SORRY MY code was (vlax-ldata-get "CADGROUPdict" "dot") Anyway I will follow your valuable advises. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 6, 2011 Share Posted December 6, 2011 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? *Shrug* Good point, but note that not all VL functions require (vl-load-com)... Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 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! Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 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...? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 6, 2011 Share Posted December 6, 2011 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! You're welcome 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. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 Very neat, Lee... Very neat indeed. Quote Link to comment Share on other sites More sharing options...
wimal Posted December 6, 2011 Author Share Posted December 6, 2011 The problem was occurred in my office P.C. Now I am in home. I will definitely reply tomorrow. Quote Link to comment Share on other sites More sharing options...
wimal Posted December 6, 2011 Author Share Posted December 6, 2011 The problem occurred in my office P.C Now I am at home. I will definitely reply tomorrow. Thanks very much for both gentlemen. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 6, 2011 Share Posted December 6, 2011 Very neat, Lee... Very neat indeed. 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) Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 6, 2011 Share Posted December 6, 2011 First, great usage of both atoms-family, and vl-filename-mktemp, Lee - ten points to Gryffindor house. 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 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 6, 2011 Share Posted December 6, 2011 Cheers Renderman Quote Link to comment Share on other sites More sharing options...
Tharwat Posted December 6, 2011 Share Posted December 6, 2011 First, great usage of both atoms-family, and vl-filename-mktemp, Lee - ten points to Gryffindor house. 1+ Great idea of the routine Lee . Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 6, 2011 Share Posted December 6, 2011 1+ Great idea of the routine Lee . Thanks Tharwat. Quote Link to comment Share on other sites More sharing options...
wimal Posted December 7, 2011 Author Share Posted December 7, 2011 (vl-load-com) YES IT WORKS:roll: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.