Search the Community
Showing results for tags 'autocad'.
-
Can any one teach me how to make USB lisp with password??? plssss
bunhoc_hh posted a topic in AutoLISP, Visual LISP & DCL
So i make some lisp-cover them to fas. Put all in 1 folder and make 1 mnu file that load with menuload and load all that lisp. But now i want put that in USB and when i load it to autocad, whatever i click in any lisp i want password showup then when i enter password i can use all fuction of it. Every time i open autocad and use them i need reenter password. Any change i can make that? -
Hii all...I found a multiline polyline lisp from online, its gonna ask how many line and their offset distance...but its assigning layer automatically, can anyone do the changes so it will ask which layer I want to choose for my each line and it should automatically take the linetype as by layer...if I am choosing even no. of line, then the path I am drawing its automatically think that as center line and offset the distance, can anyone makes changes so it will make one line in my drawn path and ask me in which side I want to allocate how many line... multi line.lsp
-
hello i want help for creating lisp for me please ... the lisp will do these functions 1- as the attached image (1a) if i have block with yellow at right and some green blocks 2- i want when i launch the lisp to ask me to draw poly line that i want as in image 2a 3- after that when i draw this path with polyline and press enter the lisp ask me to choose blocks that i want to connect to this polyline and i will choose one by one or multiple blocks then after choosing the blocks and press enter ... the lisp will offset the main polyline that i draw and connect every polyline with the basepoint of the blocks that i choose sequentially as appear in this image 5a (attached DWG) can anyone help me please sample.dwg
- 10 replies
-
- 1
-
- visual lisp
- visuallisp
-
(and 3 more)
Tagged with:
-
Hi! I have this code that i found here in the forum it was created by @rlx. My question is how to add an automatic current date and time to the end of the file when im saving it. Many thanks! xoxo (defun c:foo (/ _dir F NF P SF SH) (defun _dir (msg path / sh folder out) (or (vl-file-directory-p path) (setq path (getvar 'dwgprefix))) (cond ((and (setq sh (vlax-get-or-create-object "Shell.Application")) (setq folder (vlax-invoke-method sh 'browseforfolder 0 msg "&H2000" path)) ) (setq out (vlax-get-property (vlax-get-property folder 'self) 'path)) (setq out (strcat (vl-string-right-trim "\\" out) "\\")) ) ) (and sh (vlax-release-object sh)) out ) (if (setq p (_dir "Pick a directory yo!" "E:\\Autocad Files\\SSC\\North Region\\SNE\\")) (progn (setq f (getvar 'dwgname)) (setq sf "Plans") (setq nf (strcat p sf "\\" f)) (cond ((cond ((findfile nf) (print "File exists...") nil) ((vl-file-directory-p (strcat p sf)) (vl-file-copy (strcat (getvar 'dwgprefix) f) nf) t) ((vl-mkdir (strcat p sf)) (vl-file-copy (strcat (getvar 'dwgprefix) f) nf) t) ) (setq sh (vlax-get-or-create-object "Shell.Application")) (vlax-invoke-method sh 'open nf) (vlax-release-object sh) ) ) ) ) (princ) ) (vl-load-com)
-
hi can anyone here help write a lisp routine that can be run project wide to hide/show attributes . The user must be given an option to select an object , write or select attribute name and also select multiple drawings from the project. I have a code that updates the attribute value , attaching that - Please help change that to hide/show attributes updateATTRIB.lsp
-
- attributes
- show
- (and 5 more)
-
AutoCAD Table - Link Text With Equation
Walker140 posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
Hello, I have created a table within AutoCAD. I have written some words in cell "A1", I would like to display the same words in another cell using an equation "=A1". When I type the "=A1" equation the cell displays "####" Is there anyway to make this work? possibly using fields? Thanks -
I've received a design for a new drainage network, however all the pipe segments have been modelled as 3D polyface mesh (I've attached a sample DWG). The network is very large and I don't want to have to try and manually trace new polylines. Rather than going back to the designer to ask them if they can provide me with 3D centrelines of the pipes, is it possible to extract this information easily in autocad? Any help would be greatly appreciated! 3D Drainage Polyface Mesh Example.dwg
- 2 replies
-
- polyface mesh
- 3d polyline
-
(and 1 more)
Tagged with:
-
Hello, I was wondering if anyone has/ can whip up a LISP routine that selects any dimension (rotated, aligned, diametric, radial, ect) from the entire drawing (not just a selection) that has a "dim scale linear" value that is <> Not Equal to 1 I have been doing it in "qselect" then choosing the options but this is very time consuming. (Where it says "Rotated Dimension" I would like the command to check all dimension types at once, not just rotated) Thank-you kindly, Ola
- 8 replies
-
- autocad
- dimensions
-
(and 1 more)
Tagged with:
-
hello everybody , hope u all are great ... i have this lisp to get sum of some texts in autocad by choosing them one by one , but instead i wanna select those texts in one time by one selection click for them all ... i really appreciate ur help thanks in advance ;; wrriten by dlanorh from cadtutor (defun rh:em_txt ( pt txt lyr sty tht xsf) (entmakex (list '(0 . "TEXT") '(100 . "AcDbEntity") '(100 . "AcDbText") (cons 10 pt) (cons 1 txt) (if lyr (cons 8 lyr)) (if sty (cons 7 sty)) (if tht (cons 40 tht)) (if xsf (cons 41 xsf)) );end_list );end_entmakex );end_defun (vl-load-com) (defun c:t+ ( / *error* sv_lst sv_vals ent elst el num xsf ans tot qflg nlst sel pt txt) (defun *error* ( msg ) (mapcar 'setvar sv_lst sv_vals) (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*")) (princ (strcat "\nAn Error : " msg " occurred."))) (princ) );end_defun (setq sv_lst (list 'cmdecho 'osmode 'dynmode 'dynprompt) sv_vals (mapcar 'getvar sv_lst) );end_setq (mapcar 'setvar sv_lst '(0 0 3 1)) (while (not tot) (setq el (entget (setq ent (car (entsel "\Select First Text Number Entity : "))))) (cond ( (wcmatch (cdr (assoc 0 el)) "*TEXT") (cond ( (= (cdr (assoc 0 el)) "TEXT") (setq num (atof (getpropertyvalue ent "TextString")) xsf (cdr (assoc 41 el)))) (t (setq num (atof (getpropertyvalue ent "Text")) xsf 1.0)) );end_cond (cond ( (zerop num) (setq num nil) (alert "Text Entity NOT a number")) (t (setq tot num))) ) (t (alert "Not a Text Entity")) );end_cond (cond (num (setq nlst (cons ent nlst)))) );end_while (while (not qflg) (setq sel (entsel "\nSelect Next Text Number Entity : ")) (cond ( (not sel) (initget "Yes No") (setq ans (cond ( (getkword "\nSelection Finished [Yes/No] <No>")) ("No"))) (if (= ans "Yes") (setq qflg T)) ) );end_cond (cond ( (and (not qflg) sel) (setq elst (entget (setq ent (car sel)))) (cond ( (and (wcmatch (cdr (assoc 0 elst)) "*TEXT") (not (vl-position ent nlst))) (cond ( (= (cdr (assoc 0 elst)) "TEXT") (setq num (atof (getpropertyvalue ent "TextString")))) (t (setq num (atof (getpropertyvalue ent "Text")))) );end_cond (cond ( (zerop num) (setq num nil) (alert "Text Entity NOT a number"))) ) ( (vl-position ent nlst) (alert "Already Selected") (setq num nil)) (t (alert "Not a Text Entity")) );end_cond (if num (setq tot (+ tot num) nlst (cons ent nlst) num nil)) ) );end_cond );end_while (cond ( (and tot qflg) (setq pt (getpoint "\nSelect Total Insertion Point : ") txt (if (zerop (rem tot 1.0)) (rtos tot 2 0) (rtos tot 2 3)) );end_setq (rh:em_txt pt txt (cdr (assoc 8 el)) (cdr (assoc 7 el)) (cdr (assoc 40 el)) xsf) (if nlst (foreach o (mapcar 'vlax-ename->vla-object nlst) (vla-delete o))) ) );end_cond (mapcar 'setvar sv_lst sv_vals) (princ) );end_defun
-
Create slope with lisp Polyline (WANT TO ENHANCE)
Prageeth posted a topic in AutoLISP, Visual LISP & DCL
I Have lisp for placing slope and arrow with polyline and i want enhance this to what i need mention in my drawing file..so i have attached lisp & sample drawing file . and also want to enhance lisp for select all polyline at once, currently lisp select on object at once. thanks. Slope.lsp SLOPE SAMPLE.dwg- 3 replies
-
- slope lines
- slope
- (and 13 more)
-
Hi Everyone, From few days I'm trying to make an auto lisp which can understand the difference between 2 different layers and calculate area according to that. Unfortunately I'm not getting proper results anyone can please help. I was trying to create the lisp in below steps. Step-1: After entering command user will select whole drawing in single selection Step-2: Lisp will select only object in Layer-1 & Layer-2 (Other layers objects will be ignored) Step-3: Lisp will calculated the area of Layer-1 & Layer-2 Step-4: Now it will Subtract the area of Layer-2 from Layer-1 Step-5: and paste it as Text.
-
LISP INCREASE INTERNAL CONSECUTIVELY IN BLOCK FROM OD
BRIAM RAMON posted a topic in AutoLISP, Visual LISP & DCL
Hi! With the help of the autodesk forum I have this lisp that consecutively increments a numeric value in a specific field of OD, also copies the block name to another field of the same OD. This lisp assigns the internal consecutively when the field INTERNO_SENAL has a data type of character, can the same process be done when the type of the OD field is as internal? Having this lisp is it possible that the value of INTERNO_SENAL is also copied in the INTERNO attribute of the block? ADD_ID.lsp -
I found valuable lisp for auto creation block. I want to improve this lisp to following requirement * block selected object individually, not in one block thanks AUTO-BLOCK.LSP
-
Export each layer to separate FBX file (AutoCAD 2017)
mzlink posted a topic in AutoLISP, Visual LISP & DCL
Hello. I have tried to edit a script found in another topic to suit my needs but i can't get it to work the way i want to. layer2dwg (defun c:lsave(/ actDoc layCol docName dwgName actSel fCount) (vl-load-com) (defun BrowseFolder (/ ShlObj Folder FldObj OutVal) (vl-load-com) (setq ShlObj (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application" ) Folder(vlax-invoke-method ShlObj 'BrowseForFolder 0 "Select Folder to create files" 0) ) (vlax-release-object ShlObj) (if Folder (progn (setq FldObj (vlax-get-property Folder 'Self) OutVal (vlax-get-property FldObj 'Path) ) (vlax-release-object Folder) (vlax-release-object FldObj) OutVal ) ) ) (setq actDoc(vla-get-ActiveDocument (vlax-get-acad-object)) actSel(vla-get-ActiveSelectionSet actDoc) layCol(vla-get-Layers actDoc) docName(vla-get-Name actDoc) fCount 0 ); end setq (if (setq wntPath (BrowseFolder)) (progn (vlax-for lay layCol (setq layName(vla-get-Name lay) dwgName (strcat wntPath "\\" (vl-filename-base docName) " - " layName ".dwg") ); end setq (vla-clear actSel)(vla-erase actSel) (vla-Select actSel acSelectionSetAll nil nil (vlax-safearray-fill (vlax-make-safearray vlax-vbInteger '(0 . 0)) '( ) ; end vla-safearray-fill (vlax-safearray-fill (vlax-make-safearray vlax-vbvariant '(0 . 0)) (list layName) ) ; end vla-safearray-fill ) ; end vla-select (if(/= 0(vla-get-Count actSel)) (vla-WBlock actDoc dwgName actSel)); end if (setq fCount(1+ fCount)) ); end vlax-for ); end progn ); end if (princ (strcat "\*** " (itoa fCount) " files were created *** ")) (princ) ); end of c:lsave I have poked the "WBlock" line in different ways but i can't get FBXEXPORT to work in the script. Any help is appreciated. -
create dropdown menu in autocad to select commands
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCL
Hi all, I am trying to write a lisp that will create a DropDown list in Autocad. With the selection from the fields I want to execute different commands that I have defined before. (defun c:create_dropdown () (setq choise1 command1) (setq choise2 command2) (setq choise3 command3) (setq choise4 command4) (strcase (initget (getkword [choise1/choise2/choise3/choise4])))) ) -
How to transfer Link Template Data to Object Data - AutoCAD MAP 3D
BRIAM RAMON posted a topic in AutoLISP, Visual LISP & DCL
Hello Community! I have been researching this for some time, I am trying to know if it is possible through a routine (lisp) to transfer / copy the information from LT (link template associated with a database in access) to the OD (object data) as I show in the image. So i need a very specific Lisp/VLisp/VBA/Dotnet routine who asks for : -- The Link Template DB name -- Which DB fields are you interested for -- Which OD Table MAP to fill -- Which OD Fields MAP to create or to use (if already existing) -- Selecting objects -- Retain only objects which the correct parameters -- ACTION ... Copy Data to OD fields ... append DWG & MDB files as example. thanks for the help you can give me, greetings EJEMPLO.zip -
I have received the attached drawing from one of my clients. (I have removed geometry to maintain confidentiality. But it retains the essence of problem that I have). I have to write VB/A program that extracts data from this drawing. For that I need to know the extents of the drawing. The system variable ExtMin shows a value of X (98331) which is greater than the X (92817) of min. point (left bottom corner of the border) of existing geometry. I have tried everything (purge, overkill, audit, recover) but can't find a way to correct the value of ExtMin. Assuming that this drawing is corrupt and can't be recovered, then I have another problem. How can I programatically find that the ExtMin value of this drawing is wrong and hence this drawing is corrupt. ExtMin Problem.dwg
- 2 replies
-
- autocad
- system variable
-
(and 1 more)
Tagged with:
-
automation How to create random but "inline" stipple line or hatch pattern
pseudoclay posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
Good Day AllI've turned to forum advice and I really hope someone can help me.I have to create 13 wall panels that will be laser cut. The panel drawings were done in Inventor and I'm editing the flat pattern in AutoCAD. If you look at the attached images of one of these panels you will get the idea, each panel cut-out "pattern" must be randomly generated and I was hoping someone could give me some advice as doing this manually, by hand, is insane and after all we work on machines and machines can automate right!? I am also attaching a flat pattern of one of the panels (they all have different height and width dimensions too). Just as a side note I did try a scatter script but it doesn't give the appropriate result because if you look closely you will see the dashes are inline but randomly knocked out. I was thinking maybe a random dashed line script or procedure that can then be exploded to rectangular shapes for DXF export or a custom random hatch but I don't know how to do either. Hope I'm making sense. Thank you in advance.- 3 replies
-
- autocad
- flat pattern
-
(and 1 more)
Tagged with:
-
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
-
Hello! I have been getting suggestions and help from this forum for some time now, but have reached a point where I am currently at a loss. I am still relatively new to the topic of lisp and co, but I am trying to improve constantly. For my current problem, I am trying to select a block and insert a point into it. I have simplified my current lisp file into the function below so as not to go over the top. My problem is that I get back an empty selection set and thus can't execute the function from Lee Mac correctly. (defun TestFunction ( / ) (while (= ss NIL) (if (setq ss (ssget "_+.:S:E:L" '((0 . "INSERT")))) (progn (setq ent (ssname ss 0)) (setq Block (vla-item (vla-get-blocks (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))) (cdr (assoc 2 (entget (ssname ss 0)))))) (Insert_Point) ) ) ) ) (defun Insert_Point ( / ) ;; Block Einfügepunkt ermitteln (setq Message (strcat "\nEinfügepunkt wählen:")) (setq Pnt (getpoint Message)) (setq sel (ssadd)) (setq Point (vla-addpoint Block (vlax-3d-point Pnt))) (ssAdd (vlax-vla-object->ename Point) sel) ;; sel stays empty so the following line cant be executed properly (UpdateBlock doc ent sel) ) Many thanks for your help! Best regards Florian
-
Hi I work in a company, people come to us with their plot registry, on which are the dimensions (north,east,south,west) and area of their plots. But there are no angles. For example, a plot of 25 * 10 meters with an area (according to the mathematical calculations) should be 250 square meters. But 244.95 is listed on the registry.My question is how do I quickly draw this plot (according to the registry) in AutoCAD? Is there any lisp for this?
-
Good Afternoon, Everyone. I'm working on the Civil Drafting Project and I don't understand how to interpolate where the contour intervals cross the gridlines. I have drawn my grid with all of the values included, but I'm not understanding how to calculate the values. Could someone please assist me. I'm at a standstill. I would really appreciate it and be forever thankful!
- 23 replies
-
- penn foster
- civil drafting
-
(and 1 more)
Tagged with:
-
Has anyone on this forum started to get pushback from the money men regarding Autodesks move to subscriptions? We currently run mostly AutoCAD LT with a few copies of AEC pack from our Revit trial that never got downgraded. I went to the chairman to present Revit again as an option for moving the company forwards to now catch up with the rest of the industry and I got no further than the 5th slide (I started with the costings to avoid nasty shocks) and he shut the presentation down saying he isn't going to pay >£200k per year for software, up from £25k. Are any other companies looking at alternative CAD BIM software to Autodesk?
- 17 replies
-
- autocad
- subscription
-
(and 1 more)
Tagged with:
-
In this tutorial you will learn how to create contour lines from Google Earth on AutoCAD:
-
Hello! I need some advice on AutoCAD! The question is: our organization has moved back to remote work. What version of the program would you recommend to install on a laptop, taking into account that we need to use 5 computers simultaneously with "WorkTime" and "Zoom".
- 2 replies
-
- autocad 2018
- version
-
(and 1 more)
Tagged with: