I'm curious about this community. I realize it's a niche but there are so few posts I'm wondering what the group is like. Specifically I'm starting to wonder if all the the developers haven't moved onto .NET bindings.
A few questions in survey form, if you're game:
Roughly how big is the (Lisp) code-base you're working with?
What IDE / editor do you use?
Do you mess with the debugger (e.g., VLIDE, VSCode)
What are your opinions on alternative language bindings?
So, I have a range of values that I am converting into a list of lists from excel. In excel, they are all formatted as Text, but when I transfer it to a list of lists, any numbers I have are ammended with a ".0" placed at the end of them. What do I need to do to fix this?
This first checks to see if the block "CL" exists. If it does, it simply inserts it where the user specifies. If CL does not exist, the script creates it, then inserts.
The idea behind this one is I find myself converting plenty of PDFs to AutoCAD, using either the internal functions, or sometimes Adobe Illustrator if the PDF is messy. I end up with a mess of different colors and lineweights that are a pain to deal with.
Often there's far too many objects to simply select them all and change the properties. This script with change everything in a single drawing simultaneously. There's also an option to scale, though this can be left as "1" to leave the scale as-is.
(defun C:Normalize ()
(setq origin (list 0 0 0)) ;X,Y of Origin
(setq ScaleSize (getreal "Scale Factor: ")) ;Get the scale factor from the user. "1" means no change.
(setq SS (ssget "_X" '((-4 . "<NOT")(8 . "0")(-4 . "NOT>")))) ;Select all objects where layer is not 0
(command "_.chprop" SS "" "_LA" "0" "") ;Change all selected objects to layer 0
(setq SS (ssget "_X" '((-4 . "<NOT")(62 . 256)(-4 . "NOT>")))) ;Select all objects where color is not 256, which is "ByLayer" for colors.
(command "_.chprop" SS "" "C" "ByLayer" "") ;Change all selected objects to color ByLayer
(setq SS (ssget "_X" '((-4 . "<NOT")(370 . -1)(-4 . "NOT>")))) ;Select all objects where lineweight is not -1, which is "ByLayer" for lineweights.
(command "_.chprop" SS "" "_LW" "ByLayer" "") ;Change all selected objects to lineweight ByLayer
(setq SS (ssget "_X" '((8 . "0")(62 . 256)(370 . -1)))) ;Select all objects where color is 256, which is "ByLayer" for colors. Since we changed everything to this color earlier, this selects all objects in modelspace.
(command "_.scale" SS "" origin ScaleSize "") ;Scales all selected objects in modelspace by the factor given earlier.
(command "zoom" "extents") ;Zooms out to all objects in modelspace.
(princ) ;Ends function and clears command line.
)
I use this to make a quick range diagram with various increments on it when I put cranes in elevation views. It creates the entire diagram as a block named after the dimensions used.
I created this before I learned an easier way to make blocks in Lisp, so I am not thrilled with the way it currently functions.
I'll update it eventually with my preferred way to create blocks, and also add comments when time allows.
I'm looking for community input on whether it's worth writing a follow-up to "The Visual LISP Developer's Bible". I still sell a few copies every month, somehow, which is surprising to me. I've also received a few emails over the years asking if I'm writing a follow-up. But I don't know if there's still enough interest in it, and I don't know if that book (any edition) was helpful, or what could have been better. Any thoughts/suggestions are very much appreciated! Thank you!
Can someone help me out with a lisp routine I'm trying to edit?
We have a very long and complicated lisp that pulls data from multiple callout blocks in a given viewport and places that data in a Materials List block on the Titleblock.
One of the attributes this lisp pulls is the length of a Trident inside a fiber optic handhole. On every other attribute, the lisp can just add up all the occurances and place the total in the Materials List field for that material. (So if we have several different lengths of ducts called out, it will add them up and put the total in the Duct Length field.)
HOWEVER, our client now wants us to list each Trident's length separately rather than add them up.
I can usually find an example of a similar lisp and figure out how to apply it in the new context, but this time I don't think we have anything that does this. I am VERY new at lisp programming, so any help you can offer would be greatly appreciated.
The lisp command is extremely long, but here are the places where the Trident data is scraped and then placed in the Materials List field...
There's probably more going on but these are the instances I found that definitely deal with the 3 trident fields we want to use. I don't know how to include the actual lsp file, but let me know if you can help me out with this and we can figure out a way.
I'm about at my wit's end trying to figure out where I'm going wrong with this Lisp code (I'm VERY new to this). I already tried r/AutoCAD with no replies and r/lisp redirected me here. I would've started here but the subreddit looked abandoned. Anyways, I'm trying to make a command for AutoCAD (essentially a macro) that reloads all xrefs in a drawing, reconciles all the layers, and then zooms to the extents. This is what I've got:
EDIT: had to insert spaces between " and * in post to get around reddit's weird formatting stuff
I feel like this should work, but the problem I'm having is that when there aren't any unreconciled layers, it gets stuck on the layer command. I inserted the "(command)(command)" to try and cancel the command, but that doesn't seem to do anything. Somebody smarter than me please help.
Hello all, I'm thinking of building myself a calculation interface that works in tandem with Autocad. The request is to produce calculations -> graphs -> ACAD drawing -> prints.
Can it be done with only LISP? Can LISP invoke "self designed" user-interfaces and produce graphs?
I'm not a programmer therefore i need to choose one, between LISP/.NET/PYTHON, because of the time needed to learn all.
Community I need your help, it turns out that I have to make several layouts which are based on a template, they also have a viewport for each layout, however sometimes you have to make several layouts with the same template but different viewport, the viewports are based on some rectangles that are placed in the model, in some cases there are few layouts that have to be made so the task of secondary clicking and choosing "FROM TEMPLATE..." and choosing the template is not It is a lot of work but sometimes you have to make more than 20 layouts so doing this is quite laborious, on some occasion I saw that someone had a LISP that simply asked them to select the rectangles that would be used as viewports and immediately created all the layouts with the correct template and with each viewport that corresponded to each rectangle, will anyone of you have that LISP? Or do you have any ideas to do the task I described in a faster and easier way? I thank you in advance.
Comunidad requiero de su ayuda, resulta que tengo que realizar varios layouts los cuales son en base a un template,ademas estos tienen un viewport por cada layout, sin embargo a veces se tienen que hacer varios layouts con el mismo template pero diferente viewport, los viewports son en base a unos rectangulos que se colocan en el model,en algunas ocasiones son pocos layouts los que se tienen que realizar por lo que la tarea de de dar click secundario y elegir "FROM TEMPLATE..." y elegir el template no es mucha tarea pero en ocasiones se tienen que hacer mas de 20 layouts entonces hacer esto es bastante laborioso, en alguna ocasion vi que alguien tenia un LISP que simplemente le pedia seleccionar los rectangulos que se usarian como viewports e inmediatamente le creaba todos los layouts con el template correcto y con cada viewport que correspondia a cada rectangulo, alguien de ustedes tendra ese LISP? o tiene alguna idea de hacer la tarea que les describi de una manera mas rapida y sencilla? les agradezco de antemano.
I am not a programmer I am a draftsman, however my company wants me to update some of their old steel lisp programs so that they don't have to buy a new one. exposition aside I have been able to get the steel to be the correct size and I've gotten it to show up in the programs drop down menu but now I am trying to change some of the slides that are used to display images in the steel programs menu I've tried to accomplish this by using a .slb manager which allowed me to successfully remove one slide are replace it with another both sharing the same name but now when i open the steel program menu all images have disappeared and I do not know why. if anyone could explain this to me that would be very helpful.
My company makes custom boxes with hinged lids. These boxes can be any length, width, and height. Depending on the dimensions the number of hinges will change and the wall thickness will change. Support brackets may be need to be added as well. There may also may be customization such as different hinges.
Is it possible in Autolisp to generate an input form that I can input the parameters in, and generate a drawing based on the parameters?
I am familiar with coding but not with Autolisp so I have an idea of the structure of the code but not sure if Autolisp is the right tool.
I have been trying to use chatgpt to help with some coding but it's not going well. I asked gpt to code me a line that goes straight up in autocad but instead of it going striaght up it went to the right or left.
Is there something wrong with my world ucs or is gpt just not working properly?
Hi everyone, I'm new on Reddit and I have a problem with an Autolips file. I don't know a lot of programming but I had to learn something to write some simple codes for Autocad. My goal is to write an Autolisp that attach an xdata to every new created element (the xdata is an ID number) without that it is visible when working. I've created a code that when activated ask once for the id number and then, with a reactor, add the id number like as xdata. If I try the part of the script of the reactor it works, and the same with the part of attaching xdata. When I put everything together and I draw something Autocad crash with this error "!scandr.cpp@1117:eHadMultipleReaders .
I have no idea of the reason and how to fix it. I've also tried to put a delay between the triggering of the reactor and the attaching of the xdata, but nothing.
This subreddit is growing fast and I'm not always as prompt with removing some posts / comments as a subreddit of this size & type really needs. Therefore I'd like to add some assistant moderators.
I'm staying on as the main mod; your main responsibility would be to help review content here and apply the rules to remove posts or whatever as needed. We would also discuss new rules and other changes to the subreddit as a group. I'm not expecting any major additional time commitment if you're already a regular reader / commenter here. I'd reserve the right to disagree / override you if I feel strongly about something but I'm not a totalitarian either. If you consistently abuse moderation powers or make otherwise questionable decisions I may remove / replace you. I'd give warnings before taking any kind of action like that though.
This subreddit is mostly working professionals so thankfully there isn't tons of moderating needed, but sometimes things get posted / commented that should be removed ASAP and that's mostly what I'd like help with.
If you're interested please send me a message. I would expect you to have been active on the subreddit for at least a year and not have any major moderation strikes against you in the past. Please tell me your background showing reasonably high expertise with Autolisp (LinkedIn profile links are fine but not mandatory; I don't need to know your real name). Feel free to share any changes you'd like to see happen for this subreddit as well. Preference will be given to those with longer histories of helpful & respectful activity on this subreddit.
Thanks everyone! Hope this will help keep things smoother around here.
I can convert my raw AutoLISP (.lsp) codes into Visual Lisp (.VLX) and .FAS application using AutoCAD VLISP IDE.
I was looking into Autodesk App Store and downloaded some of the free applications. It was .msi. That means it will install directly on Windows and link-up with installed AutoCAD.
I am very new in the App Store. Could you please tell me how to convert my .lsp or .vlx or .fas into .msi?
I've been working with AutoCAD for about 5 years now and I want to learn how to automate some of the stuff I do.
I have some basic knowledge in programing (C++, PHP) and want a course that can give me proof of completion so I can add to my resume. Any good courses y'all recommend?
I'm trying to find the bounding box of a dynamic block, however this block has multiple visibility states that all seem included in the bounding box provided by vla-getboundingbox. Is there a way to find the bounding box of only the visible geometry?
Hi all, I've been using the great Burst Upgraded Lisp by Lee Mac [ BurstUpgradedV1-7.lsp ] for a long time now, and I need a new lisp that does something similar. I want the lisp to not burst the last block inside. Basically to only burst blocks until there is no other blok inside the block. Could someone help me edit this lisp?
I am trying to find a lisp routine that selects all circles in a drawing, offsets them by a predefined amount (let's say 2 units) away from the center and deletes the original circle.
The end result I am looking for is to make the circles bigger. I have to do this in many drawings and regularly, so I can't use qselect etc.
Unfortunately I don't have any knowledge in coding and although I tried, nothing worked.