Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/16/2020 in all areas

  1. If you want to delete items on all layouts, try something like this: (defun c:foo (/ s) (if (setq s (ssget "_X" '((8 . "0,DEFPOINTS"))));; Items on layer 0 and defpoints (foreach o (mapcar 'vlax-ename->vla-object (mapcar 'cadr (ssnamex s))) (vl-catch-all-apply 'vla-delete (list o)) ) ) (princ) )(vl-load-com) Note that @dlanorh latest ssget filter will always return nothing since he's using code 0 rather than 8 for layers.
    1 point
  2. vla-put-insertionpoint uses early binding meaning that access to the property is defined by the Type Library for the AutoCAD ActiveX Component Object Model (COM), whereas vlax-put-property or the undocumented vlax-put function uses late binding, meaning that access to the property is resolved at run-time. The difference between the late-bound functions vlax-put-property and vlax-put is simply that vlax-put will accept native Vanilla AutoLISP data types, thereby allowing you to supply lists of doubles in place of a safearray variant used by vlax-put-property, however, I've experienced issues in the past when using vlax-put with some properties and so tend to opt for vlax-put-property where possible. The differences between early & late binding become more apparent when interfacing with objects outside of the AutoCAD Object Model, for example, such as the Excel Object Model. Here, unless you import the relevant Type Library to define the properties & methods of objects within the Object Model, you will not be able to access properties or invoke methods using the early-bound vla-get-*/vla-put-* or vla-* functions respectively, but only by referencing the property or method by name using the late-bound vlax-get-property/vlax-put-property or vlax-invoke-method functions (or the equivalent undocumented vlax-get/vlax-put & vlax-invoke functions). In terms of performance, since AutoLISP is interpreted at run-time, you'll only take advantage of the performance benefits of early binding if you compile & optimise your program, and even then, the differences are close to negligible.
    1 point
  3. You're looking for a "miracle' button and I'm afraid I am the bearer of bad news. There isn't one. But don't give up hope. There are a couple of lists floating about this site that address slow performance of AutoCAD and things one can do to speed things up. A search should turn up one or both lists. Also check out the Similar Threads listed below.
    1 point
  4. Are you running 32-bit or 64-bit Windows 7? If 32-bit version you will be limited to the ram it can use. If you have 64-bit, then I am stumped. It should use all of your ram.
    1 point
×
×
  • Create New...