I can use for startups on new work stations. It will set all our custom search, toolpalette, and plotter paths and I have it working pretty well. My last hurdle is to add a trusted path to the environment to avoid users having to ok the startup lisp.
Here is a piece of the *file* is set further up in the code. It works line by line but evidently "vla-put-trustedpaths" is not legit. How can I get the additional trusted path written in to the environment?
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?
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?
Is there a way to set the Auto Constrain setting using lisp. I would like to be able to run a quick constrain all and then delete all constrains to fix gaps in geometry. However I only want to use the coincident, Vertical and horizontal.
I would like to be able to check if an Annotation Scale already exists and if it doesn't I would like to create it using the SCALELISTEDIT command and then set it to be the curent scale. I then plan to invoke the MLEADER command.
I do not want to have to rely on adding every possible scale in the list beforehand as my program would fall appart when a user decides to set an unusual scale I haven't thought of adding to the list.
See my initial start of the program.
(defun C:MLD () (command "cannoscale" "1:55") ;STOPS HERE WHEN 1:55 DOES NOT EXIST (setq IfAnnoScaleExists (getvar "CANNOSCALE")) (command "-scalelistedit" "add" "1:55" "1:55" "e") )
I have a problem that I cannot seem to solve. I have a drawings with a whole bunch of layout tabs that have a few viewports in each tab. One of these viewports on each layout tab is on the layer VIEWPORT. I did this so it would be easy to filter out the other viewports in the drawings. I am using the code below to change all of the viewports with the layer VIEWPORT to the Custom Scale 0.020833. This works for all of the layout tabs except the first tab. It will not for some odd reason work on the fist tab.
Attached is a lisp that reads an attribute block value and uses that value to set a named view. The attribute block is a diesel expression field which reads the drawing number, so it changes as the drawing is saved to a new number. I use it when I am preparing road alignment drawings. I prepare the first drawing in the set, saving views for all drawings and when I'm done I copy that drawing 001 as many time as I need, rename them drawing 002, drawing 003 etc. and use the attached lisp with scriptpro to set all my saved views.
I also have a dynamic block called "key" in the drawing with visibility states matching the named views.
either expand this lisp or create a new lisp to set the visibility using the "VN" variable.
I've looked around and only find nearly what I looking for. For 1"=20' I have a value of 0.004167 Paper Units = 1 Drawing Units, but what is the formula to calculate 1/30"=1'-0"?
I have some working code that sets the Text Style name to ROMANS inside my Mleader Style called ARROW. Here it is:
(setq dict (dictsearch (namedobjdict) "ACAD_MLEADERSTYLE") ; start setq q dict1 (member (cons 3 "Arrow") dict) ; code 3 is Mleader Style Description el1 (entget (cdr (assoc 350 dict1))) ; code 350 is dictionary entity handle er (tblobjname "style" "Romans") ; new value for MLEADER Text Style ) ; end set (entmod (subst (cons 342 er) (assoc 342 el1) el1)) ; code 342 is MmTextStyleId - write new vale to mTextStyleId
I want to modify this code so that it sets the Arrow Head Size to a specific value, say 0.125. Having a tough time figuring out the DXF codes and tblobjname to do this.
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?
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)
I'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.
Lisp 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.
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")
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.
I'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?
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.
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)
(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!!
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.
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
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.