Jump to content

Search the Community

Showing results for tags 'help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 14 results

  1. Almost every drawing I work on is exported from another Survey program and then Imported into Civil3D as a DXF I have sped up this process with a Lisp command and built in AutoCAD functions but would really like to combine the whole process into one Command. I am not sure if I can modify and combine existing lisps to achieve this or using a Script which I have had no experience with as yet. Below I have outlined the steps, attached the Lisp used and a video (two parts due to size limit) outlining the process that for every job is becoming tiresome. Redefine the inserted Block For some reason when I insert the DXF it does not automatically redefine (Which is needed to update Survey blocks to my custom Acad Blocks. So I have to re-insert the DXF to force redefine "DP" Lisp (Attached) - This routine deletes the crosses that are carried over from our Survey Software and are not required. Explode and set "By Layer" Color, Linetype and Lineweight Attsync two blocks - POINT_CROSS and $FILL Finally I would like to select the Attsync selection (POINT_CROSS and $FILL) and set their scale back to 1 Seems to be that these blocks which I have redefined to be annotative, scale according to the model space when inserted which we don't leave on 1:1 but our most commonly used scales for each template. As always the expertise and help provided here is greatly appreciated. Part One - DXF into Civil3D.mp4 DP (Delete Points).lsp
  2. Working to standardize a bill of material drawing that must consist of nothing more than text, lines, and blocks for a client that refuses to use datalinks and I was hoping to find a way to create a standard block that could act as a row in the table with cells containing text fields. Essentially, I would like to have the functionality of attribute definitions but have them copy down using some kind of array action. Has anyone had any luck/experience with something like this? I understand it's might be kind of impossible. Attached is what I'm hoping to have as default text in the newly generated row as the user pulls down the array arrow.
  3. Hello Smart friends, Looking for a lisp where I can select multiple objects and any objects that are overlapping and the same color get grouped together. I have hundreds of these "arrows" in a dwg that I need individually grouped or block referenced. So they're easier to move and rotate in the future. Thanks so much for any advise!! arrows.dwg
  4. In the phases of learning something new, the most frustrating thing to me is when the examples make total sense, but you lack just enough understanding to implement it yourself. I can read through Lee Mac's AssociativeCenterlines lisp, and it all makes sense, but I am missing something in my code (and thinking) to make these reactors fully work. Below is the function where I attach the reactors to the objects and all of the reactor code I'm using. The erase reactor seems to work fine, though I wonder about reattaching the reactors afterwards. I assumed doing that would help with the use of the UNDO command. Please correct me if I am wrong or if there is a better way. The modification callback just seems to do nothing. What am I missing? Do I need a reactor for commandended too? (defun SUB:Generate_Dims (circ pt1 pta ptb / ctr dim circe dime) (setq ctr (vlax-get circ 'center) circe (entget (vlax-vla-object->ename circ))) (setq dim (vla-adddimdiametric {MODELSPACE} (vlax-3d-point pta) (vlax-3d-point ptb) pt1 ) dime (entget (vlax-vla-object->ename dim))) (vla-put-textoverride dim (strcat "{\\C5;N.NNNN\\P}<>")) (entmod (list (assoc -1 circe) (list -3 (list wp:app (cons 1002 "{") (cons 1005 (vla-get-handle dim)) (cons 1002 "}") ) ) ) ) (entmod (list (assoc -1 dime) (list -3 (list wp:app (cons 1002 "{") (cons 1005 (vla-get-handle circ)) (cons 1002 "}") ) ) ) ) (vlr-object-reactor (list circ) (list wp:app (vla-get-handle dim)) (list (cons :vlr-erased 'wp:erase:callback) ) ) (vlr-object-reactor (list dim) (list wp:app (vla-get-handle circ)) (list (cons :vlr-modified 'wp:text:callback) (cons :vlr-erased 'wp:erase:callback) ) ) ) ;;; ==== REACTOR FUNCTIONS ==== (defun wp:erase:callback (owner reactor params / h en xR) (if (and (vlax-erased-p owner) (entget (setq en (handent (setq h (cadr (vlr-data reactor)))))) ) (progn (setq xR (vl-remove-if-not (function (lambda (x) (and (eq h (cadr (vlr-data x))) (eq wp:app (car (vlr-data x))) (equal '(:vlr-erased . wp:erase:callback) (car (vlr-reactions x))) ) ) ) (cdar (vlr-reactors :vlr-object-reactor)) ) ) (mapcar 'vlr-remove (cons reactor xR)) (entdel en) (mapcar 'vlr-add (cons reactor xR)) ) ) (princ) ) (defun wp:text:callback (owner reactor params) (setq {data} (list owner reactor)) (vlr-command-reactor (list wp:app) (list (cons :vlr-commandended 'wp:text:modify) (cons :vlr-commandcancelled 'wp:text:cancelled) (cons :vlr-commandfailed 'wp:text:cancelled) ) ) (vlr-remove reactor) (princ) ) (defun wp:text:modify (reactor params / val mm c %) (vlr-remove reactor) (if (and {data} (not (vlax-erased-p (car {data}))) (vlax-read-enabled-p (car {data})) (vlax-write-enabled-p (car {data})) (vlax-property-available-p (car {data}) 'TextOverride) ) (progn (setq val (atof (substr (vl-string-right-trim "\\P}<>" (vla-get-textoverride (car {data}))) 6)) mm (vla-get-measurement (car {data})) % (abs (/ (apply '- (list mm val)) (if (zerop mm) '0.001 mm))) c (cond ((or (zerop val) (>= % '1.0)) "7") ((<= % '0.075) "3") ((and (> % '0.075) (<= % '0.1)) "2") ((> % '0.1) "1") (T "7") ) ) (vla-put-textoverride (car {data}) (strcat "{\\C" c ";" (rtos val 2 3) "\\P}<>")) (vlr-add (cadr {data})) (setq {data} nil) ) ) (princ) ) (defun wp:text:cancelled (reactor params) (vlr-remove reactor) (if {data} (progn (vlr-add (cadr {data})) (setq {data} nil) ) ) (princ) ) ;;; ==== RESTORE REACTOR ASSOCIATION ==== (if (and wp:app (or (tblsearch "APPID" wp:app) (regapp wp:app))) ((lambda (/ ent obj rX dt ss i xtyp xval) (foreach rX (cdar (vlr-reactors :vlr-object-reactor)) (if (and (setq dX (vlr-data rX)) (listp dX) (eq wp:app (car dX)) ) (vlr-remove rX) ) ) (if (setq ss (ssget "_X" (list '(0 . "DIMENSION") (list -3 (list wp:app))))) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i))) obj (vlax-ename->vla-object ent) xval (caddr (mapcar 'vlax-variant-value (vlax-safearray->list (progn (vla-getxdata obj wp:app 'xtyp 'xval) xval))))) (vlr-object-reactor (list obj) (list wp:app xval) (list (cons :vlr-modified 'wp:text:callback) (cons :vlr-erased 'wp:erase:callback) ) ) ) ) (if (setq ss (ssget "_X" (list '(0 . "CIRCLE") (list -3 (list wp:app))))) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i))) obj (vlax-ename->vla-object ent) xval (caddr (mapcar 'vlax-variant-value (vlax-safearray->list (progn (vla-getxdata obj wp:app 'xtyp 'xval) xval))))) (vlr-object-reactor (list obj) (list wp:app xval) (list (cons :vlr-erased 'wp:erase:callback) ) ) ) ) )) ) As always, any help/tips/recommendations are greatly appreciated!
  5. Lejla sehovic

    Lejla Sehovic

    Hello, I am new in AutoCAD. I draw 1:1 floor plan, I draw 1m in real like 1 in autocad. Now I have to plot it in pdf as 1:50. How can I do that
  6. I want to do a dimension since the P4 P9, like in the image 2, but I wrote like you can see below and the dimension its going up(like in image 1) , I want it to go to the right! Please help, what i am doing wrong? (and (vl-cmdf "_DIMLINEAR" p4 p9 (mapcar '+ p9 (list 0.15 0.45 )) ) ) (princ) )
  7. I have this line, but I want to change it to a hidden linetype (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) '(62 . 2) )) So, I write like this.... but doesnt work. (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) '(62 . 2) '(6 . HIDDEN))) What can I do? Thanks!
  8. I want to make this design, as you can see in the image below. But, as you can see in the video I have some problems: First, I dont know why dont recognise the command "S"(Select object) in the command Hatch (watch it in the video), and then I have to make a enter, because without this wouldnt keep running(I dont understand also why). Second, I just codified that a single hatch circle would add the color 171. But, (as you can see in the video) all circles are painted in color 171, less the circle I seted it. (circle 1) Thanks if someone can help me. I am stucked. WhatsApp Video 2020-02-26 at 18.21.44.mp4 WhatsApp Video 2020-02-26 at 18.21.44.mp4
  9. I did a program in Autolisp, so I want to encript that in order to avoid hacks. What would you recommend me? Because I want rent it. Im a beginner, so I dont know to much about the topic. Thanks to much for your advices
  10. I have this, but how can I make a block of the circle in order to put the color blue? (setq R 10) (setq P1 (getpoint "center:" )) (command "circle" P1 R)
  11. I made my dimensions with this code, why they are not aligned? Look in the image below. (and (setq Z l3) (vl-cmdf "_DIMLINEAR" "_non" p3 "_non" (polar p3 0 Z) (mapcar '+ p3 (list 0 (* Z -0.5 )) ) ) ) (princ) )
  12. I have this block of text as you can see in the image below, and in the window show me this "VIGA V-SS01 (.25X .50)", BUT I DONT WANT THAT SHOW ME THIS. I want to the program ask me a question first, for example: What is the name? so I will set the answer of this question in the block I have. SO, I want to have this in the window "VIGA V- (AND THE ANSWER OF THE QUESTION)" EXAMPLE: Computer: What is the name? User write: L22 Then, that will show me: "VIGA V- L22" I will glad if you can help me, If you have already notice, I dont know to much about the topic.
  13. Hi, I am trying to find a way to label points with its own layer name like the attached lisp commando. It does it with line/polylines. Also I am trying to find a way to do this with multiple points, therefore the rotation of the imported mtext does not need to be aligned. Could anyone help me find a way to edit the code downstairs or help me with a new code? (defun alg-ang (obj pnt) (angle '(0. 0. 0.) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj pnt ) ) ) ) (defun C:LL (/ *error* acsp adoc ang fld midp mtx rot sset txtpt) (defun *error* (msg) (if (vl-position msg '("console break" "Function cancelled" "quit / exit abort" ) ) (princ "Error!") (princ msg) ) (vla-endundomark (vla-get-activedocument (vlax-get-acad-object) ) ) (princ) ) (or adoc (setq adoc (vla-get-activedocument (vlax-get-acad-object) ) ) ) (if (and (= (getvar "tilemode") 0) (= (getvar "cvport") 1) ) (setq acsp (vla-get-paperspace adoc)) (setq acsp (vla-get-modelspace adoc)) ) (vla-startundomark adoc ) (if (setq sset (ssget "_:L" (list (cons 0 "*LINE,ARC,CIRCLE,ELLIPSE")))) (foreach obj (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex sset)))) (if (not (eq "AcDbArc" (vla-get-objectname obj))) (setq midp (vlax-curve-getclosestpointto obj (vlax-curve-getpointatparam obj ( / (- (vlax-curve-getEndParam obj) (vlax-curve-getStartParam obj)) 2)) ) ) (setq midp (vlax-curve-getclosestpointto obj (vlax-curve-getpointatdist obj ( / (vla-get-arclength obj) 2))) ) ) (setq ang (alg-ang obj midp)) (if (> pi ang (/ pi 2)) (setq ang (+ ang pi)) ) (if (> (* pi 1.5) ang pi) (setq ang (+ ang pi)) ) (setq rot (+ ang (/ pi 2))) (setq txtpt (polar midp rot (if (zerop (getvar "dimtxt")) 0.1 (/ (getvar "dimtxt") 2))) ) (setq fld (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-objectid obj)) ">%).Layer>%") ) (setq mtx (vlax-invoke acsp 'AddMText midp 0.0 fld) ) (vlax-put mtx 'AttachmentPoint 8 ) (vlax-put mtx 'InsertionPoint txtpt ) (vlax-put mtx 'Rotation ang ) ) ) (princ) ) (princ "\n\t\t\tType LL to label curves with layer name\t") (prin1) (vl-load-com) ll-Label A line with its own layer name.txt
  14. Below is a breakdown of the tab, items in bold refer to the column headers on that tab. The number of entries on each tab will vary from project to project, so the code should loop accordingly. ACAD_PlansetNotes These are text blocks that should be created and inserted into the planset on different pages and locations We will only work on "standalone" items (Type), which are individual, floating pieces of text. For items on this tab you will need to: Write the text into AutoCAD in a visible layer (Text_Visible) onto the correct sheet (Sheet) Just above the visible text, write the hidden text on the "No Plot" layer (Text_Hidden) Set the width of the text block (Width_In) Text should be placed in the specified location based on x-y coordinates to the top-left corner (Location_AbsX_In & Location_AbsY_In) e.g. if Location_AbsX_In = 2 and Location_AbsY_In = 4, the top-left corner of the text should be 2 inches over and 4 inches down from the top-left corner of the page.
  • Create New...