Author Topic: how can i remove all dictionaries at once  (Read 2571 times)

0 Members and 1 Guest are viewing this topic.

andrew_nao

  • Guest
how can i remove all dictionaries at once
« on: October 11, 2013, 01:31:30 PM »
if i have more than 1 dictionary in a dwg, is there a simple way to remove them all in 1 shot?

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: how can i remove all dictionaries at once
« Reply #1 on: October 11, 2013, 02:24:30 PM »
Depends where they are located (NOD or object extension dictionary).  Aside from iterating a list with (dictremove ...) or (vla-Delete...), there aren't many options.  If there is a host dictionary which holds the target dictionaries you could delete that instead.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

andrew_nao

  • Guest
Re: how can i remove all dictionaries at once
« Reply #2 on: October 11, 2013, 02:34:28 PM »
well right now i have it working like this with a repeat call

(dictremove (namedobjdict) (strcat "DWGPROPS"item))
i cant seem to find a vla-delete function in the help files. can you provide the full function name

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: how can i remove all dictionaries at once
« Reply #3 on: October 11, 2013, 05:09:40 PM »
(vla-Delete ...), as the name implies, is VLISP which deletes a specific member of a collection.  Substantially the same as (dictremove ...).  Check the Delete method from the COM/ActiveX help.

You don't want to blindly delete all dictionaries from the NOD.  That would be BAD.   :pissed:  Iterating and removing by specific names should be sufficient.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: how can i remove all dictionaries at once
« Reply #4 on: October 11, 2013, 07:09:53 PM »
(vla-Delete ...) is VLISP which deletes a specific member of a collection.  Substantially the same as (dictremove ...).

Not quite - since dictremove does not actually delete the dictionary entry, but only removes it from the dictionary - to delete it, one must use entdel (there are of course exceptions to this behaviour where the groups & mlinestyles dictionaries are concerned).

You don't want to blindly delete all dictionaries from the NOD.  That would be BAD.

Agreed  8-)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: how can i remove all dictionaries at once
« Reply #5 on: October 12, 2013, 09:01:04 AM »
... to delete it, one must use entdel...
Actually if you reopen a dwg after using (dictremove) the dictionary will have been erased. In that sense (dictremove) is very similar to (entdel).