Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/2024 in all areas

  1. You can change the CSV file parameter on line 126 to target an existing file (to avoid the prompt to select a CSV file), and then either load the program at drawing startup or create a basic Script to open each drawing in a set, run the program, and then save & close the drawing.
    1 point
  2. Here are the two lisp I use to dump data. should update to use (ssget "_+.:E:S") instead of entsel this means you can select things before you run the command. always bugs me I will have the thing selected that I want to dump and then type the command and still have to select it again. ;;----------------------------------------------------------------------------;; ;; Dump All Visual Lisp Methods and Properties for Selected Entity ;; RO = Read Only and cant be changed with lisp (defun C:VDumpIt (/ ent) (while (setq ent (car (entsel "\nSelect Entity to Dump"))) (vlax-Dump-Object (vlax-Ename->Vla-Object ent) t) ) (princ) ) ;;----------------------------------------------------------------------------;; ;; Dump all DXF Group Data (defun C:DumpIt (/ ent) (while (setq ent (car (entsel "\nSelect Entity to Dump"))) (mapcar 'print (entget ent '( "*"))) ) (princ) )
    1 point
  3. Thank you Danielm103 for the visualization & CyberAngel for the very helpful explanation. With both I'm feeling a lot more comfortable with my understanding now
    1 point
  4. https://www.theswamp.org/index.php?topic=59415.0
    1 point
  5. You may want to do a little research on object-oriented programming (OOP). Once you understand inheritance, abstraction, encapsulation, and polymorphism, it's easier to see how the pieces of an OOP system fit together. For instance, an AutoCAD object is more like a class, while an entity is more like an instance of a class. The class defines how the entity can behave, but the instance tells you how a particular entity does behave. Visual LISP is a dialect of AutoLISP that works in an Integrated Development Environment (IDE). It's supposed to make programming easier. Visual LISP objects aren't higher level, they're the same objects in a different space. The libraries are necessary to run code in that space. Visual LISP, in effect, adds a layer of abstraction so that you don't get stuck in the weeds of AutoLISP. Commands that start with vla- are part of Visual LISP. Commands that start with vlax- are part of the ActiveX system, which allows you to access other types of documents, such as Word or Excel. ActiveX commands are at once more generic and more powerful. Unfortunately, you can only use ActiveX with Windows. If you want to retrieve the layer of an object, you can do it either way, but notice the difference: (vla-get-layer 'obj) (vlax-get-property 'obj Layer) With the first command, you get the layer of an object. With the second one, you can get any property of that object, even if the property isn't related to AutoCAD. You can use either one, depending on how you feel about context, readability, and consistency.
    1 point
  6. If you use Lee Macs function or just Field command this will give you the text string to use for a field - and that can be pasted as text into the drawing. For example, this: %<\AcSm Sheet.Number \f "%tc4">% will create a the current sheet number You can put text around this if you like such as: Sheet: %<\AcSm Sheet.Number \f "%tc4">% For the VLA- functions, it often depends how you selected the object or entity which to use
    1 point
  7. this might be helpful too. https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-FC6FC3E3-ED3E-4E4D-9766-8E4D037241A5
    1 point
×
×
  • Create New...