Jump to content

Search the Community

Showing results for tags 'lisp routines'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 15 results

  1. Hello I am new in this website. By new i mean it is the first time i make an account. I have been visiting this website for around 3 or 4 (maybe 5) years. I dont remember. After using autocad for over 8 years (starting in with autocad 2009) i sometimes start to think that i can not learn any more. But everytime i see a new lisp routine, and my lack of knowledge to code them, i feel that i have so much to learn. Anyways, enough chit chat. I am looking for two things and i hope some good person can help me pointing me in the right direction. First i would love to learn how to co
  2. Hi there, You'll have to forgive my ignorance and I'm new to the whole LISP routine area. My work has this old LISP routine for rotating text which I modified to include MTEXT and blocks. I was hoping to change it solely for block rotation in another lisp routine. The way we have our blocks setup, I would need this LISP routine to add an additional 90 degrees to the matching rotation of the line. Could anyone please help me go about doing this? Every attempt at it has failed so far. Here is the code (defun rottxt_err (s) (if (/= s "Function cancelled") (princ (strcat "\nErro
  3. Hi all I need a lisp that adds a prefix to all layer state layers. So here is my situation, I work at a civil engineering consultancy who design mostly residential subdivisions. We have standard layers set up to keep everything consistent ie 'd driveway' or 'd back of kerb' ect and I have created a series of layer states for a range of of our standard drawings, ie 'set out plan' or 'detail plan'. My problem is these layer states will not work because when the drawing is xref'd in the layers now carry the prefix of the drawing name ie 'monbulk design xref/ d back of kerb'. As t
  4. bmw1789

    Slope calculations in plan view

    I am sure there is a way, whether it be lisp routine, or feature already within autocad, but I have yet to find it. What I want to do is be able to take a point that represents a grade and determine the elevation along a line to another point representing a lower or higher grade. Typically I would get the measurement between the points and just do the math. It would be great if you could select a point..be prompted to select (+ or -) and then enter a percentage, and then when you end the line it gives you a + number or a -number in which represents the rise or fall from point A to B. To t
  5. I'm trying to find a lisp routine that searches the current drawing for a certain string and replaces that with the string of a variable already defined by the user (in this case the text to look for is "****" and the variable is called "offerte"). Not only in the Text, Mtext but also in the Blocks, Dynamic blocks, attributes and fields... Following code gets the job done but only for normal Text and Mtext. (defun tekstreplace (/ tss tdata) (setq tss (ssget "X" (list (cons 1 "****")))) (repeat (sslength tss) (setq tdata (entget (ssname tss 0)) tdata (subst (cons
  6. We often collect ground penetrating radar data in a somewhat irregular grid of traverses at 90 degrees to each other (loosely east and north) and then put the information on a client's CAD basemap of the site. Our field notes consist of a line position and start and stop position for each line, so that I have a text file arranged as: LINE START STOP 50E 10N 40N 55E 12.5N 40N change direction 0N 50E 55E 5N 55E 50E I'd like to use the text file of these coordinates to automatically plot line segments. Right now, I'm u
  7. I have seen this done in the past at other firms. I am trying to insert a block on a wall using only a pickbox (one step). I am fairly new to lisp routines. I can get the block to insert fine, but I then am having trouble with the rotation. I would like the pickbox to determine the rotation automatically based off of the side of the line I pick, I currently have it asking for the rotation. If I pick on top of a line, the block faces up, if I pick the bottom, the block faces down.
  8. I need a lisp routing which does the following: -Pick a point -Draw a leader to a 2nd point -Draw a rectangle or preferable a box with rounded ends in which I can insert text -Maximum of 15 characters (based on current text settings) -Leader will go any direction depending on 2nd point, but text is always same orientation -Do a WIPEOUT behind text box It would also be nice if the text is editable. Allen Brier
  9. Hello, I have been a lurker on these parts for a while, now i need help with a problem of my own. (I use autocad mechanical 2013) I have a cad drawing which contains 1000's of blocks, each with its own part reference within. As we use autodesk Vault and cad's design centre in tandem both the block name and partref description need to match. At present many block do not. What I am investigationg a a lisp type routine which will automatically rename all blocks in a drawing with its part reference description. As I am a novice with lisp I would like the forums help with this.
  10. Hey guys. I have a LISP I wrote this morning that asks for an insertion point, grabs the layer of the object, then draws a MLEADER on an associated layer. I have it working completely, except when a block is selected. Can anyone take a look at the code and help out? Thanks in advance! (defun c:wtags (/ p1 ) (setq oldlayer (getvar "clayer")) (setq os (getvar "osmode")) (setvar "osmode" 531) (setq p1 (getpoint "\nSelect wire to tag: ")) (setq ent (entget (car (nentselp p1)))) (setq wlayer (cdr (assoc 8 ent))) (if (= wlayer "F-ALRM-WIRE")(setvar "clayer" "F-ANNO-TAGS")) (if (= wlay
  11. I'm posting this thread in the General Forum because I'm not sure where else to put it and being new to Cadtutor I'm still learning protocol. If I'm in the wrong area please let me know! Thank you! On to my question then. I've been reading through a large number of threads, not looking for anything in particular, just reading to learn new things (and learn I have!). I've noticed there almost always answers involving lisp routines. I understand what the lisp does but I know nothing about writing or launching them. Can anyone give me a recommendation of where to go to begin reading
  12. Hello all I have a lisp routine which will load Layer states and I have assigned it's command to a button - each layer state is assigned to a unique name and a button is created for it - The lisp routine loads a specific .las file into the drawing. For that, I have created a folder with all *.las files stored in it. The problem is that when I click on a button to turn on a layer state, it will apply the layer state to all viewports. How can I apply a layer state to only one viewport and not affect all viewports in all tabs? below is what I have (DEFUN C:d105 () (command "Layer"
  13. Hello, I'm an AutoLISP newbie and I need to iterate through a folder of .DWG files, running a lisp on each file one at a time with no prompts to the user. Can this be done in AutoLISP? Here is the lisp that will be run on each file: ;delete_layers_except (vl-load-com) ;(defun c:demo (/ aDoc name) (setvar 'Clayer "0") (repeat 4 (vla-purgeall (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object))))) (vlax-for itm (vla-get-layers aDoc) (if (and
  14. Hi peoples, I've got a new challenge: Is there a Lisp that moves selected objects to an exisitng, specified layer? I want to be able to select objects on the screen, type in a short command, and they automatically go to a certain layer (let's call it "Layer 1"). Having looked everywhere on the net, I can't find anything similar, and I don't know enough AutoLISP to be able to write it myself... Thank you in advance! Dan
  15. DebbieO

    Document control system

    I am trying to develop a document control system for my drawings. I am currently using AutoCAD 2011 but will soon move over to 2012. My previous employer had a great system using an excel spread sheet to input details that would then be updated into the drawings' annotated title block using a .csv file and the 'update' command to complete the job. How can I create this same system, can anyone help me please?
  • Create New...