AutoCAD Visual LISP / AutoLISP :: Support File Search Path
Sep 18, 2013
Some of our 64-bit users lose their custom Support File Search Paths.
After reading about it, I saw that I could add them back in by putting
(setenv "ACAD" "S:\Fonts;S:\Acad2007\Hatch_Patterns;S:\Acad2007\Lisp;S:\Acad2007\Simpson\Menu;”)
at the end of acad2013.lsp.
1. However, I get malformed string on input error in AutoCAD.
2. My other question is do I need to list only the custom paths or all of the built-in paths as well?
View 1 Replies
ADVERTISEMENT
Nov 8, 2013
I have a simple lisp routine that loads everytime one of my users opens a new drawing, It sets the printer paths, sets the template paths and sets a bunch of environment variables
One thing I would like to add to this lisp routine is the ability to add support file search paths.
Is there a simple setenv variable for this? or is it more complicated?
View 2 Replies
View Related
Jul 30, 2013
I'm trying to get the file name of a file outside the search path. Obviously (findfile) is not an option. The file location changes with each project so adding a search path is also not an option. I can get the path to the file but i can't seem to figure out how to get the file name. I can also get the first set of characters, as they are constant from project to project, it's just the end of the file name that changes. The file is always a PDF.
View 9 Replies
View Related
Dec 17, 2013
I'm using a Lisp which searches a certain folder and then updates all blocks, which are nested in that folder.
My issue is, that I'd like to use more than one folder on different path, where the LISP can search for this files. Is there a way to use multiple search path?
The code I'm using now to search for the blocks is: (setq dir "I:\AutoCAD Blöcke\Template\Support")
View 9 Replies
View Related
Jul 22, 2013
I used this snip it to add the path for network tool palettes. It works but it keeps adding the same search path every time i open a new session of AutoCAD. The list keeps getting longer with the same information. Say you want to make sure your users all have a certain tool palette.
(setq tooldir "z:\1111\2222\test]" toolpaths (vlax-get-property (vlax-get-property (vlax-get-property (vlax-get-acad-object) 'Preferences) 'Files) 'ToolPalettePath))(if (not (vl-string-search tooldir toolpaths)) (vlax-put-property (vlax-get-property (vlax-get-property (vlax-get-acad-object) 'Preferences) 'Files) 'ToolPalettePath (strcat (vl-string-right-trim ";" toolpaths) ";" tooldir) ))(setq tooldir nil toolpaths nil)
View 3 Replies
View Related
May 8, 2012
I have been changing setting in the Options dialog box for many years but have never made any changes directly to the "Working Support File Search Path" because these update automatically to reflect changes i make in the "Support File Search Path."
What is the purpose of these "Working" settings?
View 6 Replies
View Related
May 12, 2011
When I migrated to 2012 form 2011, it only migrated a partial list of the support file search locations. So, I reset the ones that were missing and exported out my profile.
Next I saved my workspace to my name and checked the box to "automatically save workspace".
I shut my computer down for the night. When I restarted my computer, then AutoCAD 2012 the missing support paths are missing again. I am not the only one in the CAD department that is having this issue. It is so annoying to have to reset my profile every time I shut my computer down.
View 9 Replies
View Related
Feb 10, 2011
For some reason I am not able to modify the values for the paths. I am using ACA2011.
View 3 Replies
View Related
Dec 20, 2012
I have a file path im trying to capture in a text file however its not working and autocad is prompting back,
; error bad argument type: streamp nil
Im assuming its because of the slashbacks but Im not sure..
Hence the code so far...
(defun C:GO ()(SETQ ACADLSP (findfile "acad.lsp"))(setq f (open "C: est.txt" "w"))(write-line ACADLSP f)(close f))
View 4 Replies
View Related
Jun 12, 2012
Do a quick print screen of support file search path? Our computer's are set up by an outside source and I believe they did not migrate anything correctly or did something incorrectly. My issue specifically is anything to do with rendering and materials displaying is not working. I just want to make sure ACAD 2013 is looking at all the standard file locations along with our customization files. This is happening on 2 computers that have 2013 installed, all the rest are still using 2012 and this works fine. I tried exporting that profile, but still nothing works for rendering.
View 2 Replies
View Related
Jul 19, 2012
I add 3 folder locations to the Support File Search Path. At random, all 3 of these locations disappear. I haven't tracked when this happens and what maybe happened previously, but I know I'm not the only one within my office that this has happened to. The paths are on a file server for our blocks.
Not sure how relevant this is, but I have a HP Z420 Workstation, W7-64-bit, Autodesk Building Design Suite Ultimate, using AutoCAD MEP 2013.
View 9 Replies
View Related
Jul 4, 2012
like in AutoCAD there is REMEMBERFOLDERS can u tell me if i use syntax with getfiled and i want the path to be remember next time what should i do or what syntax i use for that.
View 1 Replies
View Related
May 27, 2013
I am trying to make a script for inserting a standard title block in some drawings. ( which needs to be often done for different projects). The title block is kept in the network path. How can i specify the path in the script file in order to insert the block.
-Insert,> Block name > (I need to specify the drawing in the network to get the block in it)
View 3 Replies
View Related
Dec 9, 2011
any code that can search for a layer using wildcards?
In my specific case, I have multiple layers than begin with "MECA" followed by a job code. I'm trying to code something that will check to see which of those layers is on, then return the layer name.
View 1 Replies
View Related
Feb 2, 2012
to verify if a block exists in the drawing, use the following function, which for is too slow.Is there a faster way to search for a block?
(defun findblock (cerca / blk nomebl trovato) (setq blk (tblnext "BLOCK" 1)) (while blk(progn setq nomebl (cdr (assoc 2 blk)))(if (= nomebl cerca) (setq trovato T) ) ;-(setq blk (tblnext "BLOCK")) ) ) trovato)
View 2 Replies
View Related
May 21, 2013
I'm working out a LISP for searching my entire drawing for a MLeader with a given value and then do something if it is found.
Currently, my code dies with
; error: Automation Error. Description was not provided.
I do not know what is going wrong & I don't know what must be done next.
(DEFUN ML-SRCHSTR (TXT LBL / SS n_txt_LBL ENT P1 P2) ;|(ML-SRCHSTR TXT)|; (IF (SSGET "x" '((0 . "MULTILEADER"))) (PROGN (SETQ ss (VLA-GET-ACTIVESELECTIONSET (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))) (VLAX-FORent ss(IF (VL-STRING-SEARCH txt (STRCASE (VLA-GET-TEXTSTRING ent))) (PROGN (VLA-CLEAR ss) (INITGET 1 "Yes No") (SETQ n_txt_LBL (STRCAT "
=>> " LBL " Label EXISTS! Add another " txt "? ") y_n (GETKWORD (strcat n_txt_LBL " [Yes/No]: ")) ) (IF(= y_n "Yes") (PROGN (ppa-L-
[Code]...
My MLeader has a _TagBox & it is the attribute of the _TagBox that I am trying to check/compare the "txt" value.
View 8 Replies
View Related
Jul 11, 2013
1) I want to search the drawing for the pre-define block names given in the program.
2) If the are there, I want to replace them with the new version.
3) Program replaces the first block it finds, then tries to insert that block.
View 9 Replies
View Related
Dec 21, 2011
I am adding tool palettes for our new CAD Standards and would like to set the support paths so the users don't have to.
I will need to set:
Support File Search Path
Dictionary
Plot Style
Color Book
Drawing Template
Sheet Set Template
Tool Palettes
[URL].......
[URL].........
[URL].........
[URL].........
[URL]...........
Basically I would like to append the paths for the new items, but not overwrite the variety of existing paths.
So I assume I need to read the current paths, read the new paths and append them to the current paths, then write them as updated paths? This is for about 30 users in 11 different offices and varying cad skills.
I can tweak existing LISP routines, but have never written one from scratch. Is there an "easy" way to accomplish this?
View 2 Replies
View Related
Dec 6, 2013
Is there a way to search the database/tables/whatever to determine if new layers are present in a drawing?
I want to run a script to reconcile new layers in the sheet drawings after having cleaned the xref drawings, and the script bombs if there are no new layers present in the parent drawing.
If I could determine what triggers the layereval/layernotify sequence (tblsearch?) I could include an if or while lisp routine that would invoke the layer command and then reconcile the new layers.
View 9 Replies
View Related
Feb 12, 2013
I'm try to write a list to produce a script file!I just want to insert a dwg file in current drawing.back to MS Windows, in case of having [space] in a folder's name, we should use "" marks:
CD "Program Files"; DEL "file 10.txt"; ....
I tried both with and without "" marks but I failed!I pasted part of my code below with result of each case:
(setq TBFile "H:z.autocadA1 A2 A3.dwg")
(write-line "-INSERT" des)
(write-line (strcat "*" TBFile) des); ; *H:z.autocadA1 A2 A3.dwg <<=should be this
(write-line "0,0" des);;insert point
(write-line "1" des);;xyz scale
(write-line "0" des);;rotation
[code]....
View 4 Replies
View Related
Dec 10, 2013
Could a .lsp file work with the block editor so that double-clicking a block will make it skip straight to the editor without displaying the "Edit Block Reference" dialoge?
View 1 Replies
View Related
Aug 2, 2013
Have issues with creating an AutoCAD deployment and "The path of the added item is too long" error message?
I understand that the paths are limited to 255 characters but I tried just a local path and I get the same error.
Under Additional Files in deployment options, I want to add 2 folders under <Installation Directory> and add 2 files under Support folder.
1st folder would be ARG folder for a custom profile xxx.arg file
2nd folder would be Template with a custom template xxx.dwt file
Under Support, I want to browse and add two files: custom accaddoc.lsp and enterprise acad.cuix file.
All of those files reside on a share drive but the paths are about 40 char so I'm way below the limit.
Every time I want to add a folder under <Installation Directory> I receive the error message:
The path of the added item is too long: "Create New Folder" Please limit this path to -28 characters (currently 17).
So I copied all thos files locally but the same error show up. Is this a bug? I can't customize my deployment if those files are not available.
View 2 Replies
View Related
Oct 12, 2011
I have set up a master set of dwg. files we use to create our construction documents. The files consist of a master file that xrefs base files. All of our files are named using the project # first. (i.e. 2011001c.dwg). I have set up the master set using x's to replace the numbers.
Here is how it works:
XXXXXXXc.dwg (master file) relative path xref's the following files.
XXXXXXXlw.dwg
XXXXXXXvlw.dwg
XXXXXXXeg
XXXXXXXfg
XXXXXXXtitleblock
note: all of these files are saved in the same folder.
I am trying to find a way to keep the xref paths working when I copy the files to a project folder and rename the files using the actual job # insead of the x's as place holders. As it is now, when I change the drawing name the reference is lost and I have to manually change all of the xref paths in the xref manager. Is there a command, program, or lisp routine than can change the file names and update the paths automatically.
View 1 Replies
View Related
Sep 10, 2012
There are times that I have a really long curb polyline that has both line and arc segments. I wish to pick two points along that polyline and have it give me the distance between those two points along the path of the polyline.
Do we have this ability natively? Have I been missing something all this time? Normally I have to make a copy of the original entity, ... break, break, list erase or undo....
View 6 Replies
View Related
Aug 22, 2012
Our I.T department uses kixstart to run a batch script every morning, which is supposed to establish a network connection. The connection is 9/10 times available. 1/10 times it fails and means that workspaces and other user defined settings are inaccessible.
Bringing up the issue with I.T seams to eparch on there skills as a professional so nowadays I tend to bring it up once maybe twice but then settle for ding it my self
So what I found out is the following batch scrip/ snippet is used to establish a network
net use P: \AutoCAD_2012-08-22
I could compile a batch and then launch it using a lisp for example
(command “startapp”….
Or
(command “shell".However this would be hakky and also requires two files (the lisp and then also the bat file, rather keep it simple just the one).Is it possible to establish this connection using lisp?
View 2 Replies
View Related
Jan 3, 2014
I do a lot of repetitive tasks in my daily drawings and I’d like to make life easier! I was researching how I could write a lisp to draw a walkway path for a roof. I came across a couple of interesting posts but couldn’t follow the code because of my lack of understanding the language.
So what I do is draw a 30” x 30” square (using the rectangle command). Then copy it so there is a 2” gap between them. Then I go back and hatch them with a dot hatch scaled to 96. What I’d like to do is type a command and it would draw the walkways for me and hatch them if possible. The problem is the last one is a custom cut size depending on the length of the walkway run?
Now I know I can draw a line, draw the square, hatch the square, array it on the path with set distance between items, then fix the last one so it looks the way I want it to, and then delete the line. But why do all that when I have a program that allows me to customize it to be done for me?
View 6 Replies
View Related
Jan 6, 2012
I have the following path declared for a R2007 workstation:
(setq rr (strcat "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5001:409\Profiles\" (getvar 'CPROFILE)))
How can I extract this path without manually declaring it?
Something like:
(VL-Get-Registry-Path-Prefix (getvar 'CPROFILE))
Which will result in the following statement:
(setq rr (strcat (VL-Get-Registry-Path-Prefix (getvar 'CPROFILE)) (getvar 'CPROFILE)))
Dyslexia is a permanent physical disability that cannot be seen.
View 2 Replies
View Related
Dec 4, 2012
I am trying to export each sheet in an Excel file to an separateTXT files.
I currently have code to read each cell in a sheet, but unfortunately some of the Excel sheets have in excess of 5000 cells and it is taking too long to read. So I am switching to another method.
The program will check dates of TXT files and XLS file to make sure TXT files are current (if not, open and recreate TXT files).Then read the TXT files (much faster).
Where I am getting stuck is 2 places -
Get the names of each sheet in the excel file (not always a known name)
Save each sheet as separate TXT file.
Here is condensed code so far without error checking, etc -
(defun E2TXT (FileName /)
(if (and (setq XLfile (findfile FileName)) (vl-file-systime XLfile) (setq XLapp (vlax-get-or-create-object "Excel.Application")))
(progn
[Code]....
View 4 Replies
View Related
Aug 20, 2013
(if (findfile MyFile)
(setq fl (open MyFile "a"))
)
the file exists however the open function still returns nil... the file is not read only, and permission on the file appear to be just fine.What other reasons would there be that cause open function to return nil?This is happening only on one machine. All the others are writing to the file just fine.
View 5 Replies
View Related
Feb 10, 2013
When you start autocad for the first time, it creates a profile with the default support file search paths. Where does AutoCAD get this from?
I want to use this for a tool I am creating.
View 8 Replies
View Related
Dec 22, 2011
I am trying to make a script file to open a drawing and run a lisp routine. They both work independently just fine, the script file will open the all of the files fine... and the lisp is in the startup suite and works in all the files. But when I tell the script file to open the first drawing then run the lisp it hangs trying to open the next file after running the lisp. I have Filedia set to 0, but the message I get when it goes to open the next is "No canvas exists. click New Canvas." (And on top of that... Filedia even set back to 1 still does not display the Dialog box anymore, I have to shut down AutoCAD 2012 and start again then it works.) I Have tried several ways, Opening one at a time then run lisp, and open all files first and then try to run lisp (that closes the file after running) and try and run it again in the next... It will only run the lisp one time and then locks up from there.
View 7 Replies
View Related