AutoCAD Visual LISP / AutoLISP :: Automatically Installing Tool Pallets And Routines

Sep 18, 2012

We are working together whit another firm and we would like to share our tool pallets and lisp routines. The pallets and lisp files we would like to share are quite large so we would like to simply send them a USB stick whit all the files and a title "executable" program that automatically puts them on the right place and changes the appropriate information.

View 2 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Updating Old Routines?

Oct 14, 2001

I have a routine I wrote years ago for R12 and it worked fine. Now when I try it in 2000 it freezes Acad when I select the first button. The routine is for structural steel members and the idea is to select a country of origin which brings up a list, then select a section type from the list which brings up another list of all available sizes. You then select the
size member you want then insert it into the drawing. There is also an option to explode the block on insertion. If I remove the (set_lista) section from the following line it doesn't freeze.

(action_tile "AUS" "(setq sectype AA)(setq Country 1)(set_lista)")

(set_lista) is a selection of lists, the list to use is determined by the variable "sectype".

I can select the country I want then cancel the dialog box and type (set_lista) at the command line then reopen the dialog box and the list is refreshed. Just won't do it automatically.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Of Routines With DCL Files

Aug 8, 2012

I have writted a set of lisp routines with dcl files that I have implemented in most versions of Autocad since release 14. I can install the toolbars in Autocad 2013 but when I try to execute on of the commands, either by toolbar icon or command line, I get the message "Unknown Command".

I have added the appropriate paths to path list.

Dell Precision M4400 Laptop

Vista Business

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Merge Two Align Object Routines

Nov 23, 2011

I've gotten these two routines from different threads on here. One works with *text and blocks.  The second works with multileaders.

I'd like to merge the two so one command can work with a selection set of any of the above objects (assume selection set of mixed objects - some multileaders, some text, some blocks)
 
(defun c:at ( / ss ang *error*)(vl-load-com)(ErrorHandler '("cmdecho" "osmode"))(setvar "cmdecho" 0)(setvar "osmode" 576)(setqss (ssget '((0 . "*TEXT,INSERT")))ang (getangle "
Select two points along desired alignment:"))(mapcar'(lambda (x)(vla-put-rotation(vlax-ename->vla-object x)ang))(mapcar 'cadr (ssnamex ss)))(*error* nil))(defun c:test (/ ss ang i sset)(vl-load-com); Tharwat 17. 05. 2011 (if (and (setq ss (ssget ":L" '((0 . "MULTILEADER")))) (setq ang (getangle "
Specify Rotation Angle :"))) (repeat(setq i (sslength ss)) (setq sset (ssname ss (setq i (1- i)))) (vla-put-TextRotation (vlax-ename->vla-object sset) ang)) (princ)) (princ))
 
Or see C:AT and C:TEST in the attached file

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating A Script To Run Multiple Routines?

Apr 17, 2012

I have hundreds of drawings I want to run through scriptpro with a script calling 3 different lisp routines.  I have the 3 lisps working independantly but can't figure out how to get them to all run in one script.

Two of the Lisps are for redefining the title block in 2 different types of drawings that have different title blocks.  The last lisp locks all viewports in all windows.  I'll attach the 3 lisps I'm trying to merge in the script.  I am not very versed in scripts and lisps so I'm guessing at least 2 of these lisps could be merged into a single lisp...

Here is what I have for the script file contents (which doesn't work):

(load "redefine100")

(load "redefine102")

(load "vlocker")

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Conversion Of Base Routines To Diesel MACRO Based Routine

Jul 3, 2012

" Convertion of AUTOLISP base routines to Diesel MACRO based routine to be used in a AUTOCAD LT based platform "

Here i am attaching the lisp file for ready reference.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create A Self-installing Package

Apr 1, 2013

until now I've always used ACADINST.exe to realize my self-installing setup packages for my application lisp: [URL]

Now there AutoCAD2014 which introduced some variables that affect proper operation completely automatic: TRUSTEDPATHS and SECURELOAD.

Is there a way to add search paths, modify variables, load menu, set the automatic start of a *.Lsp or *.Fas, during installation of the application, without opening AutoCAD?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Loading Custom Profiles For Use Just After Installing?

Nov 9, 2011

We have been using Custom profiles for many years.   We have always had issues that just after we install, we have to reload the custom profile to get it in place.   When I say reload,  I mean we launch the program the first time with a /p <profile name>.  (The path to our custom profile is in the string launch string.)   Seems to default to a random profile, or something we don't recognize.    The process here is we are pushing out installs to 200 users and don't want each user to set one of the defaults current, delete our custom one, reload our custom one and set it current. 

Once the profile is loaded the next times opening all is well.   Because, of course, it was last used.

What am I missing or misunderstanding?   We see the profile exists in the registry before we reload.  The custom profile we use is an export.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layers ON / OFF Automatically

Jan 25, 2013

I know that for layers ON/OFF in current open dwg file, I should use:

[I just want to On/Off for my "STAMP" layer]

(COMMAND "LAYER" "ON" "STAMP" "")
(COMMAND "LAYER" "OFF" "STAMP" "")

but I have more than 150 dwg file and I should open all of dwgs one by one and setting ON/OFF for STAMP layer for every drawing and it takes so much time!  

I just want to select files and LISP program set the STAMP layer to ON or OFF value.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Blocks Automatically?

May 29, 2012

I want to find a Lisp routine for building rooms (bedroom, bath, kitchen etc).  example: I want to build a bedroom and every bedroom has the following blocks: smoke detector, door, window, bed, night stand, closet.    Is there a way to run a lisp routine that would just ask me for basepoints and rotation angles of all those blocks?  Basically it would automate building a bedroom by inserting all the blocks for me and just prompting me for basepoints + rotation angles. 

Would a macro be better suited for this? I want to do one for every room - kitchen, bath, bedroom, living, dinning etc.  I already have a nice collection of blocks. 

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rename All The Layouts Automatically

Jan 10, 2013

I am looking for a lisp that will rename all the layouts automatically. I tried the Layoutlist function but the output is not in order. Is there anyway that i can get all the layouts in a drawing from left to right order. for eg. i have layouts from layout1, layout 2........layout10). The layoutlist returns as layout1,layout10 etc...instead of layout 1 layout 2.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Mirror Object Automatically

Nov 10, 2011

I am looking for a lisp routine which will allow me to mirror an object that I pick automatically.  I don't want to have to pick the two points to set the mirror line.  I just want the point I pick on of the object I select to be the point of the mirror.  If that can't happen, I was wondering if the object could mirror at its insertion point (like if it were a block or a text.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Block - Add Attributes Automatically

Nov 3, 2013

How I can modify this code to create a block, ask for a new name for the block, then add the attributes listed inside the code below to the new created block. The lisp does a wonderful job - however, it only works if you already have a block created. We are in the process of drawing components and making blocks one by one, so it makes sense to add the attributes automatically when the block is created. We currently have over 500 components to create as a block and set the attributes to each one by one. 

Also I would like to know, If Fields can be used inside the lisp routine. That way we can always have access to the attributes from outside the block and change values for all the blocks at once.

(defun c:addattribs ( / blk def ) (while (not (or (= "" (setq blk (getstring t "
Name of block to update: "))) (tblsearch "BLOCK" blk) ) ) (princ (strcat "
Block "" blk "" not found.")) ) (if (/= "" blk) (progn (setq def (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) blk)) (vla-addattribute def (getvar 'textsize) acattributemodelockposition "New Attribute 1" (vlax-3D-point 0 0) "NEW_TAG1" "New Value 1" ) (vla-addattribute def (getvar 'textsize) acattributemodelockposition "New Attribute 2" (vlax-3D-point 0 (- (* 1.5 (getvar 'textsize)))) "NEW_TAG2" "New Value 2" ) (command "_.attsync" "_N" blk) ) ) (princ))(vl-load-com) (princ) 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Offsetting Simple Geometries?

Feb 13, 2012

I have an autocad file with a simple rectangle in it.

The goal is to offset this rectangle 1" to the inside of the original rectangle, then delete the original rectange.

How could I go about this in autolisp??

I know I could use basic commands to bring up the offset functions, but i'm not too sure how i could write autolisp to offset in the correct direction, and the correctly delete the larger rectangle without deleting the smaller one as well.

Maybe put them on different layers? How I could achieve this?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Delete Text With 5 Or Less Numerical Values?

Dec 29, 2011

Automatically deleting all text entities that do not include 5 or more numerical values.

By numerical value i mean a whole number 1-10.

Selecting certain text based on criteria would be useful.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine That Automatically Inserts Parameter In Block

Apr 26, 2012

I am working on a lisp routine that automatically inserts a parameter in a block and then ads a stretch command to it. But the problem is that for the stretch command u need to select the drawn parameter. So my plan was to get the name of this parameter (car (entsel)) and feet it to my lisp program. But when i do that it doesn't work because autocad demands a parameter. 

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Dynamic Block Property (Scale Uniformly) Automatically

Dec 16, 2010

How to change the Scale Uniformly property in dynamic blocks accross hundreds of drawings using either/or scripts, lisp, vba or anything else that might do the job.

I just need to open the drawing and select the block (one block per drawing) then edit the scale uniformly property within the block, save then close the drawing and move onto the next drawing.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Export Attributes From Selected Blocks To Defined Txt File

Oct 3, 2012

How to create a lisp to automatically export attributes from selected blocks to defined txt file without having to everytime confirm the file name, location and if the file shall be replaced?

Meaning is that I often export attributes to txt file for further use. It is always the same file (I just overwrite it always).

The way I do it now is selecting blocks, using ATTOUT command, then going to the desktop, selecting ATT.txt file and confirming that it is to be replaced.

Is there a way to make lisp or script that will just do all it in at once?

I found on forum such a lisp as below, but it exports all ablocks on drawing and it exports to txt file which is located in same  place as drawing and with same name as drawing. Tried to modify it but without success:

(defun cut-att ()
(load "attout")
(setq fna (strcat (getvar "dwgprefix")
(acet-filename-path-remove (acet-filename-ext-remove (getvar "dwgname")))
".txt"
))
(setq ss (ssget "X" '((0 . "INSERT") (66 . 1))))
(bns_attout fna ss)
)

Same question for ATTIN - I use attin and always same file name from same location - how to automate it with one command?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Attribute Blocks - Change 1st Tag Values Automatically According To 2nd Values

Jul 18, 2013

I have an attribute blocks and this att block has two tag values , is there a simple code for to change 1st tag values automaticly according to  2nd values ?

for example :

1st tag (50x50) - 2nd tag ( 100 )    ==> 50x50-100

if i enter 201 valuse to 2nd tag then 1 st tag has to change as 100x100

if i enter 501 valuse to 2nd tag then 1 st tag has to change as 150x510

I attached a jpg file for explain much better

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Pick Up All Hatch And Solid Hatch Patterns

Aug 6, 2008

I am in need of a lisp routine which will automatically pick up all hatch and solid hatch patterns within a drawing and change the colour to colour 254.

View 9 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 :: 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 :: 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 :: 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 :: 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

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 :: Add New / Blank Button To Custom Tool Bar

Apr 17, 2012

AutoCAD 2012

When I am in the CUI editor and I right click on a button in a custom tool bar, it gives me the option to "duplicate" or "copy".

But when I go to change the properties of the new button, it changes both the original and the new button upon "apply".

Can I just add a new/blank button? I've tried dragging a new command from the list at the lower left corner but it does the same thing. :?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing XREF Layer Colors In A Tool

Oct 5, 2012

How to edit the string below so that it will ignore all layer names starting with "E-". I want to change all XREF layers in the current dwg. to 161 but ignore all XREFED layer names that start with E- such as E-lighting, E-power etc.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Justify Text Using TJUST Express Tool

Mar 7, 2012

I am trying to use LISP to justify text using TJUST express tool. I have different layers I need to justify differently - current code causes the error "extra cdrs in dotted pair on input". Or a better way to do it???

(setq N 0 ctext nil) (repeat (sslength ss) ;
begin loop (setq ctext (entget (ssname ss N)))
(setq clayer (cdr (assoc 8 ctext)))
(cond ((= clayer "LABELS")
(setq flag "Start") );

[Code]....

View 3 Replies View Related







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