Questions from beginner to advanced. Tell us about good sources of free lisp and post your own routines for testing.Code posting guidelines
The "AutoLISP, VBA, the CUI & Customisation" forum has become a very lively part of the AutoCAD Forums and probably needs a structural review in order to acommodate growth in the future. I'm...
Code posting guidelines
When you are posting AutoLISP or VBA code in these forums, there are some simple guidellines you should observe in order to make life easier for you and for others.
Subject Convert text to mtext in lisp?
What lisp command to convert strings to mtext?
I am looking for (or maybe making) a lisp routine that would change text
to mtext by allowing...
I have drawing that are labeling the lines at feet. It takes the nearest inches and rounds it off to the even number that is next. Example 10'-9" equals 12'.
I want to learn how to take those...
I am trying to identify points on an arc where if a horizontal line was drawn from a test point across the arc the result would be a list of on or two points where the Y coordinate...
I am trying to convert a toposurface from Revit into a solid so that I can cut voids into it (I am modelling a building made from underground tunnels.)
The exported toposurface from Revit...
Suppose that I have a drawing made in milimeters units, And I want to
draw a line 3 units long , But these 3 units must be times in inch units (25.4)
and drawn as 76.2 long.
I think i should post this here.
Is it possible, in LISP, to make a routine that would perform the following items.
1. Copy a Layout
2. Rename the copied Layout with the Information...
I was wondering if anyone knew a way to get an automated data extraction. As in if I click a button it will go through the process of a data extraction & automatically pull out the...
I am trying to get z-coord from a region so I can move it to the current ucs z=0 position.
I thought I could do it by setting the ucs to object, the object being a region but for...
I have a lisp routine which reads point coordinates from excel sheet and inserts blocks at those points. All the points have 3 decimal places. For example
Check this out in your Autocad command line:
And here is the result:
Why is that ? ... it's not return the same number which is 12.123456
And I tried to inserted into a text, and it come...
Please refer attached drawing with arabic letters, Whenever we make plot, it will be plotted all the fonts reversely. If we see the Preview, it is correct but on print it is wrong. ...
HOW TO CREATE IT
Roman numbering (incerment)
I recieved a lisp from Lee Mac. Bored.lsp
Code is as follows:
(defun c:bored ( / cir cnt gr lst n d )
;; © Lee Mac 2010
(setq lst (list (getvar 'viewctr) (getvar 'viewctr)) cnt 0)
I have a lisp routine to do this but I want the option of selecting a new name for the block OR a random block name that autocad makes.
How would I modify this lisp routine to do that?
When I double click on a block to edit and the Message Box appears, the block
name itself is not included in the pull down list automatically. so I have to look for it manually.
I am wondering if there is a way to insert a block from file into an autocad drawing using a LISP script. I already have a script that does a bunch of stuff, but want to add a generic note in at a...
Perfect example of what I'm looking for is: if you type in -insert it will remember the last block you've inserted and if you hit enter the routine continues with that block.
I can't figure it...
In my routine I have to ask the user to pick some points, all the points he wants.
To do that I've done like this and it works
(setq points nil)
(setq pt (getpoint "\nSelect a point:"))
Need help with a really simple problem here... It's been a while since i've dealth with LISP, so i'm pretty rusty... I'm trying to create a simple save to file path kind of routine... The...
Hello! It's my first post. Here's my history with LISP. I've been using it for 2 days at work and so far I've been hacking and slashing trying to get a functioning LISP routine for Autocad 2008.
I seem to be having a lot of trouble creating a linetype i just received on a set of drawings. its a thick line that thins out and back to thick kind of like long arrowheads back to back....
I have an horizontal line, by selecting its vertexes my routine should put a text centered above the line.
This is the code I've written, but it doesn't work, the problem occurs when the text should...
I’m Create a block manager
1000 block in my library how can make slide is every drg
I’m tired to make every time open drg & zoom extend give command mslide & save
Please advice me best...
I am doing a little playing around and studying
I want to know if I can shorten my code by placing (3) entities in one variable and then using one entmake to create all my entities.
Hi everyone, I need to write a function in Visual Lisp that will place text over a line or pline .
The text would be relative in size or length to the line selected (this is not mandatory but nice)...
Use this control to limit the display of threads to those newer than the specified time frame.
Allows you to choose the data by which the thread list will be sorted.
Order threads in...
Note: when sorting by date, 'descending order' will show the newest results first.
Conceived, created and cared for by David Watson © 1996–2016