Jump to content

Recommended Posts

Posted

(setq n1(vlax-ldata-put "library1"" name1" 1a))
(setq w1(vlax-ldata-put "library1"" name2" 2a))
(setq h1(vlax-ldata-put "library1" "name3"3a))
 (setq s1(vlax-ldata-put "library1"" name4"4a))

(vlax-ldata-delete "library1"????? )

 

Please tell me correct code to delete whole library at once

Posted

To delete all keys:

(foreach key (vlax-ldata-list "library1")
   (vlax-ldata-delete "library1" (car key))
)

 

To remove the dictionary completely:

(dictremove (namedobjdict) "library1")

Posted (edited)

Thanks Sir, You advises are very helpfully to me.

But there is a problem.

The file was 25kb before delete the library1

after delete it increased to 47kb.

I need to reduce the capacity of file by deleting the library.

I used following code

(dictremove (namedobjdict) "library1")

 

After reloading the cad it displaying 28kb

Edited by wimal
Posted

dictremove will only remove the entry from the supplied dictionary, if you also wish to delete the entity from the drawing database, you will need to use entdel, e.g.:

 

(if (setq ent (dictremove (namedobjdict) "library1"))
   (entdel ent)
)

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