Search the Community
Showing results for tags 'wildcard'.
-
Select specific named layouts and save them in a folder as a PDF
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCL
Hi Guys, I have several layouts when drawing, which also have different names. I want to save in a Lisp all layouts that start with a specific name in a certain folder as PDF. I am new in lisp, but i have managed to write a lisp that selects the correct location for me. Unfortunately only all layouts are printed. (defun c:Dokument_Export () (command "-EXPORT" "PDF" "ALLE" (strcat (substr (getvar "DWGPREFIX") 1 70) "\\08_Auftragsbestätigung\\" (strcat (substr (getvar "DWGNAME") 1 8) "_Zeichnung") ) ) ) You have any idea? Thanks in advance. -
Hi everyone glad to be in this amazing forum. Straight to the point: is there a way to explode the nested blocks in a drawing that contain a a common word in their name? In our case we have a lot of blocks exported from vectorworks whose name was substitute with -group-xxx-y, is there a way to run a routine similar to exnest but that would explode only the nested blocks with that similar name? Thanks for any help:)
- 5 replies
-
- exnest
- nested block
-
(and 2 more)
Tagged with:
-
I have a drawing that has texts as * and would like to replace with X using find/replace command. The AutoCAD understand or gets confused with * as wildcard and replaces all entities with X. Any ideas? Using AutoCAD 2008. Thanks
-
lisp to change layer properties if layer name contains text
pnoraa posted a topic in AutoLISP, Visual LISP & DCL
I'm trying to find a lisp to change layer linetypes and colours if they contain certain text in their layer name. e.g if I have a layer called "contour 1234" among others, can a lisp change the colour and linetype of layers starting with contour ? and does anyone know where I can find a lisp for this? -
Opening documents with a wildcard character - script
Serabis posted a topic in The CUI, Hatches, Linetypes, Scripts & Macros
I am trying to open up a document in a script routine, and I know the beginning of the file name (and it is unique) but when I add a wildcard character, the script throws an error. For example, say the file name is Project_1-title.dwg, I want to be able to open that file with ' open "Project_1*.dwg" ', or even just Project_1*. Is there any way of doing this, or must you know the entire file name in order to open the document? Thanks in advance. -Serabis -
Use Lisp to search & insert multiple drawings as blocks.
rob150588 posted a topic in AutoLISP, Visual LISP & DCL
Morning all. I'v written a very short routine to insert map tiles we have on our server where all the user has to do is type in the Grid reference they require. All the tiles are named by their reference (i.e. SJ4522 or NZ0572) (defun c:mmbmap ( / GRDREF MAPPATH) (setvar "cmdecho" 1) (setq GRDREF (getstring "Enter Grid Ref [sO4522]: ")) (setq MAPPATH (strcat "N:/CAD/2D/MappingTiles/" GRDREF ".dwg")) (command "_.insert" MAPPATH "0,0,0" "1" "" "") (command "zoom" "o" "l" "") (princ)) This is all very straightforward, BUT (there's always a but), about 10% of the tiles are so large in file size, they are split into 4 tiles (i.e. instead of SE5076, it would be; SE5076NE, SE5076NW, SE5076SE, SE5076SW). So what I'm asking is whether the routine I have can be modified to search for just the first 6 characters of the filename, and if it finds multiple files with that name to insert all of them ?