Jump to content

Leaderboard

Popular Content

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

  1. The load expression could be something like the following to load and then execute the function: (if (not c:dimtext_bgmask) (load "dimtext_bgmask.fas" nil)) (if c:dimtext_bgmask (c:dimtext_bgmask))
    2 points
    This add-in is SO helpful. Thank you to those who contributed to this. This saves me so much time when I have to hatch stormwater drainage areas! Thank you!!
    1 point
  2. @Lee Mac thanks! (if (not c:dimtext_bgmask) (load "dimtext_bgmask.fas" nil)) (if c:dimtext_bgmask (c:dimtext_bgmask)) And it works! (_autoload "dimtext_bgmask")(c:dimtext_bgmask) This also works, but not with all files... By the way, this expression can also be used for Lisps, so as not to add it at the end of the code (c:11) (_autoload "11")(c:11)
    1 point
  3. In a complex architectural design project using AutoCAD, I'm facing challenges with optimizing my drawing file size without compromising the precision and detail of the model. I've already employed techniques like purging unused elements and using external references efficiently. However, I'm curious to know if there are advanced strategies or specific commands within AutoCAD that experts recommend for reducing file size while preserving intricate details in large-scale projects. Any insights or best practices would be greatly appreciated!
    1 point
  4. Ok I think I understand, say the - Shape L=8.7m becomes say 10 with count 2, please confirm.
    1 point
  5. @Lee Mac Thank you very much! Magic has happened! It works the way I wanted it to! The text gets into the command string and the lisp is loaded. It's incredible! Your work is very valuable. Good luck in the new year!
    1 point
  6. Assuming I've understood what you're looking to achieve, you could potentially use the sendcommand method to accomplish this, i.e.: (defun c:ctext ( / ent enx str ) (while (not (progn (setvar 'errno 0) (setq ent (car (entsel "\nSelect command text: "))) (cond ( (= 7 (getvar 'errno)) (prompt "\nMissed, try again.") ) ( (null ent)) ( (not (wcmatch (cdr (assoc 0 (setq enx (entget ent)))) "*TEXT")) (prompt "\nThe selected object is not text or mtext.") ) ( (setq str (cdr (assoc 1 enx)))) ) ) ) ) (if str (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) (strcat str "\n"))) (princ) ) (vl-load-com) (princ)
    1 point
  7. First, create the surface in the Prospector (which is in your Toolspace). To do this, right-click on Surfaces and select Create Surface. You don't add any information to it in this step, just give it a name. Second, expand the Definition for the surface (still in your Prospector). You'll see a list of object types you can add to the surface, such as points, contours, and breaklines. Select the points (for instance) you want to use, right-click on the Points item, and tell it to Add. Do the same for breaklines or whatever else you need. If the items you need to add are on different layers, it may help to isolate them before you select. Don't worry about getting your surface exactly right on the first try. You can always close the drawing without saving (you saved first, right?) or edit the surface afterward. To get a look at the surface itself, select it and use the 3DORBIT command. You'll probably have questions. We''re here to help.
    1 point
  8. Some time ago on this forum, I used a context menu to insert predefined texts. On that occasion, I received the help of the talented @Lee Mac to develop the necessary code. The code is basically a menu (list) that contains the specific texts that you want to insert. If you want to change the text, simply right click and choose the option with the desired text. The height of the inserted text automatically adjusts to the current text style. In the event that the style does not have a defined height, the user will be prompted to enter a specific height. You can find the original post where Lee Mac gave me help at this link. Here you have the code adapted to your needs. I hope this is helpful to you. (defun c:ITEXT ( / IR_*error* IR_dch IR_dcl IR_des IR_hgt IR_idx IR_ins IR_lst IR_sty ) (defun IR_*error* ( msg ) (if (< 0 IR_dch) (unload_dialog IR_dch)) (if (= 'file (type IR_des)) (close IR_des)) (if (and (= 'str (type IR_dcl)) (setq IR_dcl (findfile IR_dcl))) (vl-file-delete IR_dcl)) (if (and msg (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))) (princ (strcat "\nError: " msg)) ) (princ) ) (setq IR_lst '( "_autoload \"11\"" "_autoload \"12\"" "_autoload \"13\"" "_autoload \"14\"" "_autoload \"15\"" "_autoload \"16\"" ) ) (setq IR_sty (getvar 'textstyle) IR_hgt (cdr (assoc 40 (tblsearch "style" IR_sty))) ) (if (zerop IR_hgt) (progn (initget 6) (setq IR_hgt (cond ((getdist (strcat "\nAltura de texto <" (rtos (getvar 'textsize)) ">: "))) ((getvar 'textsize)))) ) ) (if (and (setq IR_dcl (vl-filename-mktemp nil nil ".dcl")) (setq IR_des (open IR_dcl "w")) (foreach str '( "txt : dialog" "{" " key = \"dcl\"; spacer;" " : list_box" " {" " key = \"lst\";" " width = 40;" " height = 20;" " fixed_width = true;" " fixed_height = true;" " allow_accept = true;" " }" " ok_cancel;" "}" ) (write-line str IR_des) ) (not (setq IR_des (close IR_des))) (< 0 (setq IR_dch (load_dialog IR_dcl))) ) (while (not (cond ( (not (new_dialog "txt" IR_dch)) (princ "\nDialog could not be loaded.") ) ( (progn (set_tile "dcl" "Select Text") (start_list "lst") (foreach itm IR_lst (add_list itm)) (end_list) (set_tile "lst" (cond (IR_idx) ((setq IR_idx "0")))) (action_tile "lst" "(setq IR_idx $value)") (zerop (start_dialog)) ) ) ( (while (setq IR_ins (getpoint "\rSpecify text insertion point <back>: ")) (entmake (list '(000 . "MTEXT") '(100 . "AcDbEntity") '(100 . "AcDbMText") '(008 . "_TEXTOS") (cons 007 IR_sty) (cons 040 IR_hgt) (cons 010 (trans IR_ins 1 0)) (cons 001 (nth (atoi IR_idx) IR_lst)) (cons 011 (getvar 'ucsxdir)) (cons 210 (trans '(0.0 0.0 1.0) 1 0 t)) ) ) ) (redraw) ) ) ) ) (princ "\nUnable to write & load DCL file.") ) (IR_*error* nil) (princ) )
    1 point
  9. Depends on the reason for the file size. Sometimes a file might become bloated through creating it, orphaned entities and so on, purge and audit can clear some of these but if the file is unusually large still then copy and paste into a new file (top right to bottom left select) will normally just grab what is still in the drawing. Wblock to a new drawing also does the same. (every now and then I get one, delete everything and it can still be very large, megabyte large type of thing). If you have inserted files such as background images (we often get PDF underlays, exploded to lines but the PDF is still there) then these can be assessed and deleted where applicable. Purge, Audit, overkill. If you have splines converted to polylines you might look at the LISP 'pdiet' (mentioned the other day in the LIPS topic threads) Might not help individual files but xref common details in a project Blocks - make blocks of any common details
    1 point
  10. Version 2.5.36.0

    3,392 downloads

    AutoCAD users often have to deal with the BOUNDARY (BPOLY) command, which allows creating boundaries (mostly enclosed polylines) from existing objects forming an enclosed area around the point specified. Unfortunately, its performance as well as the quality and the accuracy of the boundaries (contours) created when run in complex drawings leaves much to be desired. To eliminate these common drawbacks of the standard BOUNDARY command, a project called "SuperBoundary" was implemented. While BOUNDARY command generates simple contours quite efficiently in relatively simple drawings with a small number of objects on screen, SuperBoundary is intended to provide the user with comfortable workflow in drawings of any complexity. In other words, SuperBoundary is the utility based on the BOUNDARY concept supplemented by super-speed and some super-features. Key features: High performance. A powerful program engine allows analyzing and generating thousands of boundaries in seconds. High accuracy. When generating a boundary, all elements larger than the specified tolerance factor are considered. The possibility to create boundaries in areas having significant gaps between adjacent objects. The possibility to quickly detect and generate all the enclosed areas in the selected drawing or its part. Easy and accurate external outlines generation in complex drawings. Polylines generation from spline- and ellipse-based boundaries using piecewise-linear approximation Flexible adjustment of the boundaries generated. These are width, color and layer. Simple and convenient installation with classic installer. List of commands: _SBND - launch the app in classic mode _SBND_PICK - for quick usage in "pick point" mode _SBND_ALL - for quick usage in "build all" mode _SBND_CONFIG - for export / import current settings data as an external INI file
    1 point
×
×
  • Create New...