AutoCAD Visual LISP / AutoLISP :: Visual Effect Settings?
Jun 20, 2013Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.
View 4 RepliesLisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.
View 4 Repliesi just come across a lisp and i find it quite usefull,but then i wish to modify it abit. I have attach a sample of the lisp and jpeg to show what i require.basically all i need is the leader to be in multileader type. Is it possible? Additionally, can i set by default the coordinates to be shown in just 2 decimals?
View 9 Replies View RelatedI'm trying to fix my profile via lisp-registry key. Why? Because the profile we use is part of a plug-in meaning we can do it using our profile so I alternatively the answer is to tweak the one supplied as part of the plug in.
The method I’m familiar with is to edit using the following code as example;
(vl-registry-write "HKEY_CLASSES_ROOT\.PEN\Shell\open\command" "" "notepad.exe %1")
However that’s for creating a new registry key entry the one I have already exists but needs to be modified, better yet the profiles name (*.arg file) can change with updates, so in my search I came across the following link.
[URL]
Now I cant put it together and am not sure where I have gone wrong…(See code bellow)
(vl-registry-write "hkcu "\Profiles\" (getvar 'cprofile) "\General\DefaultConfig" "\\DCMAR02\A03P20")
I have a routine that sets user defined osnaps based on a text file.Here is what is an example of user stored osnap settings -
(setq User_Osnaps (list (list "Alan" "endp,midp,int") (list "John" "cen,ins")))
Here is routine I use to set user osnaps -
(defun CU ()
(vl-cmdf "-OSNAP" (cdr (assoc (getvar "LOGINNAME") User_Osnaps)))
(princ)
)
This works great so long as the user is not in the middle of another lisp routine.How can I change this to a transparent command that will work to set osnaps while running another lisp routine?I would like to store it in a toolbar button.
We have a big issue where half our users can't open autocad. We have half running 2013 and half running 2006. For our 2013 users we've gone to our start menu and reset settings to default. and then just re-loaded our custom menus. How can I reset Autocad 2006 to default if I can't open Autocad?
We need to get people up and running.
for my latest little project I'm trying to change layer settings depending on a entry in a sheet set attribute.
Basically, if the sheet set custom attribute entry is 'white' I want the colour of a specific layer displayed as 255,255,255, and if it's blue I want it changed to 0,0,255. So I can control the colours from a sheet set custom properties level.
And for it to check if the layer existing in the drawing, so it'll skip the process if it's not there.
How do I tranfer all my standard autocad variable settings into a new version of Architecture? I have my dimensioning settings, etc set a certain way in my standard autocad and now I want to start using Architecture but need all my old settings.
View 9 Replies View RelatedI’m trying to create a plot command that reads settings in from a variable stored in a text file but its becoming muddled up somewhere.
(defun c:MYPLOT ();Setting nessesary variables...(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYOUTPUTDEVICE.PEN")(if(setq f(open fname "r"))(while (setq MYOUTPUTDEVICE (read-line f))(close)))(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYPAPERSIZE.PEN")
[code].......
Is there a way to programatically set a visual style before a drawing actually opens?
We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings. Some models will crash on some workstations when trying to open in a rendered mode.
I found a lisp with a function that looked to set viewport visual styles. But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)
Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high? If there is no lisp already created, how to create one?
See Continuous dimension attachment for example.
I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.
I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg"). how would i go about doing that using LISP?
View 2 Replies View RelatedI'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.
attached is what I have written so far:-
Is it possible to execute a certain command based on multiple selections withinin a dcl? for example: two radio colums, one with selections A and B, and a second with selections 1 and 2. is it possible to program commands based on user selections from each column? ex: if A and 1- do a command. A 2- do a different command, etc...
I tried :
(action_tile "key1" "(setq A t")
(action_tile "key2" "(setq B t")
(action_tile "key3" "(setq 1 t)(done_dialog)")
(action_tile "key4" "(setq 2 t)(done_dialog)")
(if
(and (a) (1)
)
(command ...
but was unsuccessful. no matter which combination was selected, the command under all combinations would run.
I am trying to find a lisp that would get an attribute value (tag name = NBR_5) . I'm trying to run a simple routine that would let the user place the value from the titleblock attribute as text on a drawing. I see a ton of articles regarding getting attributes but I am not well versed in programming.
View 9 Replies View RelatedI have a routine that work fine, but I receive a nil at the end of command. How to fix that?
View 7 Replies View RelatedI'm trying to find acceptable point values to feed to the vlax-3d-point function for a vla-addmtext function. With vanilla lisp I just provide the point as x y = "7/32" "2-3/8". So I assumed that I could drop a 0 in for the z like: (VLAX-3D-POINT "7/32" "2-3/8" 0).
Then I thought I was going to be tricksy and try (vlax-3D-point (getpoint)) believing that I could pick the point and get what I need to feed the function, but yet again, no deal. The command line gave me:
node
of #<variant 8197 ...>
Nothing I can use in my code. So how do I find the point in a format that vlax-3d-point will like?
What is the magic word for put a point at each end of an arc, the lisp I have only put a point at center of the arc.
(defun cAA ( / i j ss e1 e2 p1 p2 p3 points )
(if (setq i -1 ss (ssget '((0 . "ARC"))))
(progn
[Code].....
Is there a quick way of getting the value of an attribute?
I have an attributed block called "tp_attributes" and it has and attribute called "OrderNum".
I just want to be able to quickly grab that value.
I use Spell Check regularly and I always check the entire drawing. I would like to add to the Spell macro so that when I pick Spell from the toolbar it goes past the Check Spelling window and begins checking the entire drawing.
I believe I need to insert Alt S into my macro to select Start from the window to begin the check. Is there a character or series of characters that will represent Alt in a macro?
I upgraded from Autocad 2004 to 2012 recently and my lisp file doesnt work anymore.
what it's supposed to do is when looking at the layout tab that you want you can switch to the model space location of the same zoom as the layout tab without messing with the layout zoom.
(defun c:msp ()
(setq cm (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command"view" "d" "tmp")
(setvar "tilemode" 0)
(command"pspace")
(princ "Click TWICE on desired VPORT: ")
(command "mspace" pause "view" "s" "tmp")(princ)
(setvar "tilemode" 1)
(command "view" "r" "tmp")
(setvar"cmdecho" cm)
(princ)
)
I need a program that simulate this DOS command: dir /on/b *.dwg >list.txt
it list all dwg files on current open dwg file folder and sort them and finally put them in a text file with list.txt name. something like thistype list.txt)
test1.dwg
test2.dwg
test100.dwg
test256.dwg
test1005.dwg
(sort alphabetically and logically) because of disabled DOS utility in my PC I need a pure lisp functions, I tried to wrote this program but I couldn't!!
(defun c:listMaker()
(vl-load-com)
(setq path (getvar "dwgprefix"))
(setq fn "list.txt")
[code]...
and also I need a append a string(='This Is EOF') in the last line of the "list.txt" file.
I have text objects with the same Z value and I will select as follows:
(setq sstxt (ssget '((0 . "TEXT")(8 . "APS-text"))))
How to store this value in another variable "zvalue" to apply to:
(command "change" "select text objects" "" "_p" "_e" zvalue "") ?
the following returns true since the @ symbol tests for an alpha character.. (wcmatch "S101" "@*").What is the Dot Net equivalent?
View 2 Replies View RelatedIs there a command that is the opposite of starting an application to open up a file? Like:
(startapp "PlaySound.exe" (findfile "CuckooClock.wav"))
Instead of starting an application, how to shut all of its instances down. Let’s say I have iTunes and/or Internet Explorer w/ a few tabs open and I can close them down without getting to the application to terminate it the usual way.
Naturally,
(endapp "iTunes.exe") doesn’t work :-))
I am trying to get my original layer and lintype reinstated after the user is finished with the pline..I know Im suppose to use the while command but am now completely lost on which way to do this
(DEFUN c:TEST1 ()(if (not (tblsearch "LTYPE" "MYWC")) (command "-linetype" "LOAD" "MYWC" "C:/COUNTER.LIN" ""));SECOND PROGRAM...;CREATE CORESPONDING LAYER...(command "._Layer" "Make" "WC LEIDING" "Ltype" "Continuous" "" "Color" "211" "" "")(SETQ MYOLDCELTYPE (GETVAR "CELTYPE"))(SETVAR "CELTYPE" "MYWC")(while (PROGN(COMMAND "pline")(SETVAR "CELTYPE" MYOLDCELTYPE)))
I have a drawing that has 2D pipeline (only x and y, z value =0) and 3 topo contour lines ( with x, y and z vaules). I need to divide the the 2D pipeline into say 2000 points and then get the corresponding z values from the topo contour lines. I think it can be done by interpolating between the z values for the two apparent intersection points of the 2D line and the contour lines, the x and y values will be the same for the points that falls between these two aparent intersections. Is there any lisp out there that can do that.
View 7 Replies View RelatedI am looking for an AutoLISP routine, which gives all aligned dimensions of a closed polyline, drawn in 3d.
I have attached a 2D drawing for reference.
The following gives me the first folder string, with no back-slashes, that the drawing exists in.
(setq FirstFolder
((lambda (/ tmpDir tmpPos)
(substr
(setq tmpDir (getvar "dwgprefix"))
(+ 2 (setq tmpPos (vl-string-search "\" tmpDir)))
(- (vl-string-search "\" tmpDir (1+ tmpPos)) (1+ tmpPos))))))
Is there a way to find the name of the second folder?
Is there a way to find the name of the third folder?
The string length of the characters for each of the first, second, third (and so on) folders are different, which means I can't count character using the "substr" function.
I have a list that contains data like this,
"Tree-01-08-AA5"
"Tree-04-12-QV"
"Tree-10-30-QS"
How would I go about sorting this list by AA5, QV, QS? I know how to use vl-sort and reverse, but I do not understand how I would go about this.
I have to go into approx 600 3D Models and rotate them all by 90.
I've just tried to search for a lisp that will do this to all of these files in one directory and can't find one. Something that will do this and save loads of time. I need to do this tonight so that these MEP files will all be ready for tomorrow morning.
I have two lists to compare and want the difference in an third list.
like
list1 ("A" "B" "C")
list2 ("A" "B" "C" "D" "E")
the difference in list3 ("D" "E")