AutoCAD Visual LISP / AutoLISP :: Program Hangs Up For No Apparent Reason?
Oct 21, 2013
I have an AutoLISP program that hangs up for no apparent reason. I can run the program with an Alert in the loop. The program is a sheet generator, creating a border (insert with attributes), dimensions and MultiLeaders in Model Space, then a new Layout Tab is generated and the new elements are CHSPACEd into the new layout. An Alert temporarily halts the program once the task of a new Layout is created. In this form, the program works as designed. However, if I comment out the Alert, the program hangs up as if in an infinite loop. Also, hitting Escape does not cancel the AutoLISP, I must use Task Manager to end AutoCAD instead. My computer was recently upgraded to Win7 64-bit. I'm running 64-bit versions of software. (AutoCAD MAP 2011).
I have a lisp program which will create a cover sheet for my electrical drawings by extracting data from the title block. Once this is done, I manually print the cover sheet.
What I would like is to create the cover sheet, have the lisp program pause, print the cover sheet, then when printing is done, quit the drawing file so the cover sheet does not remain.
I tried several approaches, but the lisp program finishes before the cover sheet prints.
What I was thinking of was in a loop some times I need multiple sets of similar variables but am not sure how many sets I am going to need. I would like to be able to increment the variable names each time the loop runs.
Have an AutoLisp program that inserts a block with attributes. Been using it forever. Yesterday I ran the program and somehow when the block is inserted, it skips the Y scaling factor. The program should insert a block at a point with a X scale of 19.2, Y scale of 19.2, Rotation at 0 and then four attribute values.
What is happening is the block is inserted at the correct point and X scaling factor, but the Y scaling factor goes in for the Rotation angle (19.2 degrees), the Rotation angle goes in as the first attribute and the remaining attributes are shifted over and the last attribute is missing.Line of code is:
Is it possible to write a program for cross section by manual input of data like below. Objective is to draw a cross section with grid lines and labels of section data and datum value.
Is it possible to get the output from the MEASUREGEOM command back into an VL program?If I use:(setq angle (command "MEASUREGEOM" "a" line1 line2 "x"),
the value of the angle is displayed on the screen but is not passed back into the program and the variable "angle" is not set.Is there a way that I can set this variable?
I would like to write some sort of AutoLISP program to evenly space objects across a given distance. I have attached a .pdf file showing what exactly I mean.
I would like the program to enable me to either enter or measure (via the selection of two points) the "z" distance, to enter or measure the "y" distance, and to enter the number of objects, "n". I would then like the program to evenly space "n" objects across the "z" distance.
A program like this is, I have to be honest and say, way beyond my current capabilities.
I'm trying to create a macro for a toolbar button to open a third party program. Basically we want to open a custom .exe application from a button on the ACAD toolbar.
I’m currently having a serious problem with my Photoshop CS4 where it continuously crashes, for no apparent reason, since July 16, 2013. I have done everything recommended via Adobe forum to try and fix this problem though it still persists. It crashes randomly and I am usually unable to use Photoshop for more than 20 minutes. Below is the error message that appeared when Photoshop crashed,
Is this something that is possible? Basically I have an excel file with sample data that comes coded (red background for fail, Green for pass) Then we transfer that into halos on a DWG. got a routine to count the halos in a DWG. Now I was thinking it would be nice if it compared the number to the excel file to make sure no mistakes were made when placing the halos.
So as I mentioned I've seen rountines to read data in cells but none to count cells based on colour.
They were working correctly yesterday, and now the presence of any extension, including 'Adobe Exchange,' will cause the entire application to hang once they are selected from their panel. This seems to be the case for any/all extensions (at least the ones I use). Once I remove them all, the stock tools on the right-hand panel work correctly. However, adding back any of them means that using the panel will crash the application - whether it is selecting an extension or using a built-in feature like "Adjustments" or "3D".
Curiously, when an extension is added to the panel (assuming I don't click on it and crash PS) and I close the application like normal, Photoshop also hangs on exit, forcing me to 'force quit' it. I am not sure how that is related, but there seems to be some kind of correlation.
I'm on an early-2011 macbook pro, 8gb of ram, Radeon 6750M with 1gb of video ram, loads of disk space.
I dont know if this is just me but whenever i try to create and work with a 3D object in Photoshop, this black square seems to pop up for no apparent reason and its really bugging me [mainly because it sometimes blocks my view of the perspective].
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!!