Author Topic: Findind App ids  (Read 4062 times)

0 Members and 1 Guest are viewing this topic.

whdjr

  • Guest
Findind App ids
« on: January 11, 2005, 11:45:12 AM »
How do you do a search to find what applications are loaded within AutoCAD?

While testing code in the VLIDE I was "watching" some vars and checked out the extended data for an entity and the list that came up to choose which application to use was about 20 items long.  Are all these apps loaded in my AutoCAD session or are they just an accumilation of previous apps used?  If they are just an accumilation is there any way to reset the list back to the default AutoCAD list?

SMadsen

  • Guest
Findind App ids
« Reply #1 on: January 11, 2005, 12:09:31 PM »
The app names for extended data are not necessarily loaded applications. They are only specified by the applications that created the extended data (with the REGAPP function).

All registered apps can be found in the symbol table "APPID". The entries in that table are the names you see in the list you describe.

whdjr

  • Guest
Findind App ids
« Reply #2 on: January 11, 2005, 01:43:58 PM »
Call me stupid, but I can't get a listing of all the registered apps.
Can you hlep?

SMadsen

  • Guest
Findind App ids
« Reply #3 on: January 11, 2005, 01:51:52 PM »
Provided app is nil:

(while (setq app (tblnext "APPID" (not app)))(princ (cdr (assoc 2 app)))(terpri))

whdjr

  • Guest
Findind App ids
« Reply #4 on: January 11, 2005, 02:01:02 PM »
Thanks Stig.

What would be the method of determining which ones are not needed, and then how do you "unregister" the apps?

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Findind App ids
« Reply #5 on: January 11, 2005, 02:20:28 PM »
Will, you really shouldn't worry too much about them. They are not taking up that much space and they don't load any applications. They are merely placeholders for data used by other applications.

For instance, the old Bonus Tools' layer command held the data for LayerFilters in the dictionary for the registered app "RAK".  

ADT, LDT and other 3rd party app's use these and deleting them will "dumb-down' the drawings as far as those programs are concerned. I just chacked one of my drawings that has been worked on in Softdesk8 and LDT3, it has 42 registered apps, most of which would render the drawing useless, as far as further design goes, if deleted.

whdjr

  • Guest
Findind App ids
« Reply #6 on: January 11, 2005, 02:39:40 PM »
I know you say I shouldn't worry about these, but I have 30 loaded.  How many do you have?
And to make matters even worse I don't know where they came from.
We're only using A2K with no addons.
Code: [Select]
.................
LOG ("ACAD_PSEXT" "DCA_DTM_FAULTS" "svPLINE" "CADZOOKSMATERIAL" "ADE_PROJECTION" "DCO15" "AEC_ROUNDTRIP_15" "ADE" "AECBASE" "DCA_FIGURE_XENT" "SDI_XSECTIONS" "CIVIL_SPIRAL_TABLE" ... )
[0] "ACAD_PSEXT"
[1] "DCA_DTM_FAULTS"
[2] "svPLINE"
[3] "CADZOOKSMATERIAL"
[4] "ADE_PROJECTION"
[5] "DCO15"
[6] "AEC_ROUNDTRIP_15"
[7] "ADE"
[8] "AECBASE"
[9] "DCA_FIGURE_XENT"
[10] "SDI_XSECTIONS"
[11] "CIVIL_SPIRAL_TABLE"
[12] "CIVIL_CURVE_TABLE"
[13] "CIVIL_LINE_TABLE"
[14] "CIVIL_DRAFT"
[15] "SDSK_POINT"
[16] "SDSK_PMN"
[17] "ADCADD_ZZ"
[18] "AME_SOL"
[19] "CGSURVEY_FOR_AUTOCAD8003671157"
[20] "AVE_GLOBAL"
[21] "AVE_MATERIAL"
[22] "AVE_FINISH"
[23] "AVE_ENTITY_MATERIAL"
[24] "AVE_RENDER"
[25] "RAK"
[26] "BNS_SPRHATCH"
[27] "SDSK_STRUCT"
[28] "ADCADD_MATERIAL"
[29] "ACAD"
.................

whdjr

  • Guest
Findind App ids
« Reply #7 on: January 11, 2005, 02:44:00 PM »
Are these things like layerfilters, do they get carried over from dwg to dwg?
I know what tools we are using and only one creates an app, and it's not listed here.  These must come from our clients, because we don't use any of these names.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Findind App ids
« Reply #8 on: January 11, 2005, 02:52:38 PM »
Yes, they come from your clients, a good portion of those are from Land DeskTop. No, they don't get copied over like the LayerFilters do.

Just for grins, I whipped up this little lisp that will delete all unreferenced AppIds. It will also show which ones it couldn't delete and why.

Code: [Select]

;;portions of this code by Kerry Brown as posted to Cadvault
(defun c:DelRegApp ( / colRegApps tmp app strAppName msg before)
  (vl-load-com)
  (setq colRegApps
         (vla-get-registeredapplications
           (vla-get-activedocument (vlax-get-acad-object))
         )
  )
  (setq before (vla-get-count colRegApps))
  (vlax-for app colRegApps
    (setq strAppName (vla-get-name app))
    (if (not (vl-catch-all-error-p
      (setq tmp (vl-catch-all-apply
  'vla-item
  (list colregapps strAppName)
  )
    )
      )
    )
      (progn
(setq msg (vl-catch-all-apply
    'vla-delete
    (list tmp)
    )
      )
(if (vl-catch-all-error-p msg)
 (princ (strcat "\n " strAppName " - " (vl-catch-all-error-message msg))
)
 )
)
      )
    )
  (princ (strcat "\n....There were " (itoa before) " apps, there are now " (itoa (vla-get-count colRegApps)) " apps...."))
  (vlax-release-object colRegApps)
  (princ)
)

whdjr

  • Guest
Findind App ids
« Reply #9 on: January 11, 2005, 03:02:06 PM »
Thanks Jeff.

That will come in handy.

MikePerry

  • Guest
Findind App ids
« Reply #10 on: January 11, 2005, 04:24:41 PM »
Quote from: whdjr
What would be the method of determining which ones are not needed, and then how do you "unregister" the apps?

Hi

Try this post -

Re: CDGpurge 4.0

Have a good one, Mike

whdjr

  • Guest
Findind App ids
« Reply #11 on: January 11, 2005, 05:01:24 PM »
The code Jeff supplied deletes the Unreferenced Registered Apps using ActiveX.  Is there a way to delete them using Vanilla Lisp?  I tried using entdel, but it didn't seem to work.  Any ideas?  The reason I'm am asking is beacuse I have a tool I wrote to remove xdata from objects so we wouldn't keep getting those proxy objects notifications, and I wanted to incorproate this with that tool and it doesn't use Active X.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Findind App ids
« Reply #12 on: January 11, 2005, 07:38:48 PM »
Since you are using ACAD2000 & ADT 2005, just incorporate it. The program doesn't care if you are using a mixture of the 2. To call inside a lisp,
change my routine to a function:
Code: [Select]

(defun c:delRegApp ( / colRegApps tmp app strAppName msg before)

change that line to
(defun delRegApp ( / colRegApps tmp app strAppName msg before)


Then in your other routine just make sure that mine is loaded and call it like so:
(delRegApp)