AutoCAD Visual LISP / AutoLISP :: Tool Palette Search Path Duplicating Entries

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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Get Filename From Outside The Search Path?

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

AutoCAD Visual LISP / AutoLISP :: Using Multiple Search Path?

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

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 View Related

AutoCAD Visual LISP / AutoLISP :: How To Put LSP Files In Tool Palette

Mar 3, 2013

How do I have a .LSP file load automatically when I open autocad?And how do I put .LSP files in the tool palette?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retaining Tool Palette Grouping

Apr 18, 2011

I am developing 'enterprise' tool palettes which i've put on a networked drive to which i have write permissions and the users have read-only permissions. Within these palettes, each palette has separators and Text titles to group the commands and these groups originally appeared on everyone's computer as i expected when i first made them available. But now when i add new commands to a palette on the networked drive, the new command appears on the correct palette, but at the bottom of the palette, on the user's computers.

I have made provisions for each user to create their own collection of palettes, which are saved on their own directory and, of course, they can do whatever they want with them. But i want to prevent them from re-organizing the enterprise palettes and more importantly, if i add a new command in palette "X" and locate it in group "y" of that palette, i want it to be in that location when the users view it.

Is there some way to make the enterprise palettes on their computers look like i arrange them?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Tool Palette From Shared Catalog?

Aug 9, 2013

I have created a new tool palette. The tool palette takes the blocs from a drawing.

Now I want to connect this to a catalog, so it can refresh from there. I should be able to export the tool palette with a right click but I only have the possibility to rename, new palette or delete.

I guess that once I have managed to export the catalog I can then easily import the tool palette in my colleagues computer. Also if it links to the same catalog we should be able to easily refresh it.

We use Autocad 2012 with hsbCad.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Tool Palette Macro To Insert Explode Block

Mar 29, 2013

It's been too long since I created one of these for Toolbars. I need a macro that will insert and explode a block. I just need the block's content, not the block itself. I can create a maco to explode a block with no path, but can't remember how to include the "*" in a file with a folder path to explode the block while its being inserted. Because of spaces in the file name, quotes (") must be around the path.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Table Search With Wildcards?

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

AutoCAD Visual LISP / AutoLISP :: Search A Block Quickly

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

AutoCAD Visual LISP / AutoLISP :: Search For Existing MLeader With Attribute Value

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

AutoCAD Visual LISP / AutoLISP :: Search And Replace Predefined Blocks

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

AutoCAD Visual LISP / AutoLISP :: Setting Support File Search Paths In Routine?

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

AutoCAD Visual LISP / AutoLISP :: Search Database / Tables To Determine If New Layers Present In Drawing

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

AutoCAD Visual LISP / AutoLISP :: CUI And Palette Edit Rights

Jun 4, 2013

I've started a new job and inherited a lot of custom files and menu's without documentation.

The company CUI is setup as the enterprise menu and displays READ ONLY on my system. And the company palettes all have a padlock displayed. All relevant files are on the server.

WHat rights do I need to edit and update these files?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Lost Profile Missing Images In Palette?

Sep 27, 2012

I recently lost my windows autocad profile and i am having to start redoing the auatocad laout from scratch.  I have the xtp file for the palettes which have loaded the images in ok, however there are some palettes which have not "linked" with the images in the image folder. How to reassign every single image to the item in the palette?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: SPACE In Folder Or Path Name

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

AutoCAD Visual LISP / AutoLISP :: Remember The File Open Once Or The Path?

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

AutoCAD Visual LISP / AutoLISP :: Block Editor Path Shortcut?

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

AutoCAD Visual LISP / AutoLISP :: Path Of Added Item Is Too Long

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

AutoCAD Visual LISP / AutoLISP :: Renaming Relative Path Xrefs?

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

AutoCAD Visual LISP / AutoLISP :: Distance Between Two Points Along The Path Of Polyline

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

AutoCAD Visual LISP / AutoLISP :: Establish Network Connection / Path

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

AutoCAD Visual LISP / AutoLISP :: Path For Drawing Containing Block In Script File

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

AutoCAD Visual LISP / AutoLISP :: Routine To Draw Walkway Path For A Roof

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

AutoCAD Visual LISP / AutoLISP :: Extracting HKCU Path From Unknown Version Workstation?

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

AutoCAD Visual LISP / AutoLISP :: How To Unlock Tool Palettes

Oct 11, 2006

I have a problem when creating new Tool Palettes..

As soon as I exit autocad after creating them and then re-open CAD the next day all the Tool Palettes have the locked icon in the bottom corner so I'm unable to add to them.. I've tried everything to unlock them...making sure the atc files aren't read only, unlocking all tool bars in menu customization etc but nothing works.....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color Of Drafting Tool Tip

Aug 24, 2012

I use the following lisp to control my window background colour,

;Setting window colour to crimson (uses OLE colour code system)...(vla-put-TextWinBackgrndColor(vla-get-display(vla-get-preferences(vlax-get-acad-object)))3937500)

However I would like to change the drafting tool tip background also using lisp, but I don’t know which vla-put-….. I need?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Tool Button Image Missing?

Jul 13, 2011

I added a couple of standard Autocad MAP tabs to a custom  panel and in my custom workspace some of the button images don't show up. If I go to the Planning & Analysis workspace, the images are visible, but in the custom workspace, all I get are clouds with a question mark.

I attached two screen shots.

Civil3D 2014 SP1
Win 7 Professional - 64-bit
HP Z400
Xeon W3550 @ 3.07Ghz
24GB of RAM
Nvidia GeForce GTX 760

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding LAYERS To Tool Palettes?

Jul 10, 2013

I've inherited management of CAD standards. A third party developed the tool palette - mostly blocks, etc. but there are also icons to add whole series of layers to drawings. Click 'Architectural Layers' you add the architectural layers. Click 'Plumbing Layers' you add the plumbing layers. Since the original implementation, things have been changed.

How do I update these tools?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Making A Most Used Tool Button For Toolbar

Sep 22, 2011

I also note I could use excel but I have this thing where id like to have the lisp and AutoCAD run independent from other external programs.

I’m the CAD monkey at work and I’m given unbelievable autonomy to what I build (sometimes I confuse work with hobby) put all to one side. My functions often require toolbars with several buttons on them what I would like for one toolbar in particular is to make a most used function button. Better said a button at the beginning of my toolbar, which execute the most used button from within that entire toolbar.
 
The ideas so far is to add a write-line (append) function lisp for every button this would intern write a button codename/ reference example SNP for snap and SAV for save and so on. All easy I can do this.
 
What I’m having difficulty with is actually counting the instances of the most used button using lisp. At the moment I’m resorting to a vb.net program, which needs to be shelled first, to recalculate the whole list it works but is messy and quite patch worked. The highest instance would then be used to set a variable, which would be used as the command in the so-called “top 1 tool button”

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved