Autocad lsp

Rookie! How can I align the CmdLine in the middle of the screen?

2024.02.07 16:59 pookdeveloper Rookie! How can I align the CmdLine in the middle of the screen?


https://preview.redd.it/w5qdi54fr6hc1.png?width=1349&format=png&auto=webp&s=bb232ceae71d3c64e8dd291dac1052f780baa778
submitted by pookdeveloper to neovim [link] [comments]


2023.06.28 16:22 JoeParez [HELP] "acaddoc.lsp" is changing my settings when I start-up AutoCAD

Anyone want to help me with this?

I wrote a custom lisp as a reminder to myself and my team of a new protocol/standard that we're using in our office. However, after starting up AutoCAD a couple of times, my settings start to change and CAD starts to function strangely. For example, when I use a command CAD will tell me it doesn't recognize the command and I have to enter the command a few times before it recognizes it.
Command Aliases will come up in the wrong order (for example when I enter 'P', I expect PAN to come up, but instead it's PLINE). Then, when I try to edit the aliases, it tells me that it can't locate the .pgp file.

Is there any way that I can fix this? Or am I SOL?

For context, I have the acaddoc at the TOP of the Support File Search Path option. Perhaps that's throwing things off?
submitted by JoeParez to AutoCAD [link] [comments]


2023.06.06 17:38 V0rticity_ Re-working rectangle classification script (LSP, Autocad)

Original issue can be read about here
I am trying to get a script working that classifies rectangles within an Autocad dwg file.
I got the below script working script, but it only works with rectangles that are exact duplicates, my rectangles can vary in width a little bit which throws a wrench into this script.
Working Script
Then I tried to add tolerances (8% in this case) in all the comparison functions (main and checklengths_MHV) by comparing absolute values of the differences, however this is giving incorrect results as well. Any help is appreciated.
Script with tolerance that doesn't Work
submitted by V0rticity_ to CodingHelp [link] [comments]


2023.05.22 04:29 Flipper_Picker Help loading VBA program in Autocad 2000

Hello! I recently set up an old Windows XP computer to run Autocad 2000. I'm not a programmer but I used a VBA program at work back in the day that was made by a coworker. If I remember correctly we just copied the code and paste into a lisp folder. Then we used 4 commands to load all the lisp routines into a drawing in Autocad (appload, autolisp weren't used.) I tried creating a lisp folder in drive C: for this code but I can't get it to load in Autocad. I'm not sure what I'm doing wrong. I realize this is a very old program but I would greatly appreciate anyone that could help. My memories are beginning to fade and I would love to revisit my old career as a drafter. Here's the code I saved from a rich text document:
(load "c:\lisp\acor.lsp")

(defun c:rrs () (COMMAND "-vbaload" "c:\lisp\rebargold-7-23-02d.dvb"))

(defun c:rrs2 () (COMMAND "-vbaload" "c:\lisp2\rebargold-7-23-02d.dvb"))

(defun c:rrs3 () (COMMAND "-vbaload" "c:\lisp\Rebarsaurous-Tx-11-03-04.dvb"))

(defun c:rcoms () (command "-vbarun" "dregmm"))

Load commands:
loadmm
regmm
rrr1
rrr2
submitted by Flipper_Picker to learnprogramming [link] [comments]


2023.05.01 03:04 Flipper_Picker load old VBA code (acad 2000)

I recently set up an old XP computer to run Autocad 2000. I have a lisp program that we used at work back in the day. If I remember correctly we just copied the code and paste into a lisp folder. Then we used 4 commands to load all the lisp routines into a drawing (appload, autolisp weren't used.) I tried creating a lisp folder in drive C: for this code but I can't get it to load in Autocad. Can anyone help me load these old programs? It's been many years since I used Autocad. Here's the code from a rich text document:
(load "c:\\lisp\\acor.lsp")

(defun c:rrs () (COMMAND "-vbaload" "c:\\lisp\\rebargold-7-23-02d.dvb"))

(defun c:rrs2 () (COMMAND "-vbaload" "c:\\lisp2\\rebargold-7-23-02d.dvb"))

(defun c:rrs3 () (COMMAND "-vbaload" "c:\\lisp\\Rebarsaurous-Tx-11-03-04.dvb"))

(defun c:rcoms () (command "-vbarun" "dregmm"))

Load commands:
loadmm
regmm
rrr1
rrr2
submitted by Flipper_Picker to AutoCAD [link] [comments]


2022.10.19 14:26 CADUSER1 AutoCAD Mechanical 2023 not opening Enhanced Attribute Editor when double clicking?

I just installed AutoCAD 2023 and am running to the problem of not opening the enahnced attribute editor with double clicking. I can type in EATTEDIT to get it, or hold control and double click an attribute to change it.
Edit: I have imported settings from AutoCAD 2021. We had an engineer that knew alot more about VBA and Lisp routines than I do. He had created a lisp routine titled "acaddoc.lsp". I am pretty sure autocad is automatically loading that and that is what is breaking a few commands. When I change the name of that file to something else, it doesn't load and the native commands are working.
submitted by CADUSER1 to AutoCAD [link] [comments]


2022.01.06 01:29 hai1sag4n Reduce delay when typing quickly into CAD?

I know with myself and a lot of people I work with, we tend to type faster than autocad can keep up. So when you type in a command and hit Enter, a lot of times the last letter of the command isn't included and you end up having to re-type.
Anyone found a solution for this? Not sure what would help. I've got a ton of LSP routines I use, and have aliases for a lot of commands. Just wondering if there's a hardware or software fix that can help.
submitted by hai1sag4n to civil3d [link] [comments]


2021.08.12 02:56 k4cadman K4 CAD Solutions - Bespoke AutoCAD Programing; Windows Programming; AutoLISP Development; Free Download

K4 CAD Solutions - Bespoke AutoCAD Programing; Windows Programming; AutoLISP Development; Free Download

Play Rubik's Cube in AutoCAD (AutoLISP program)

Follow the link to download k4kube.lsp, a free programs to play Rubik's cube.
Load the lisp program via Tools > Load Application > Select 'k4kube.lsp'.
To run the program type 'rubix' at the command prompt (best played in a blank drawing).
Screen-shot of game in AutoCAD
Download k4kube.lsp
submitted by k4cadman to AutoLISP [link] [comments]


2021.07.29 18:20 lastguymade Sorting Points based on Coordinates

Hello all!
So I have a project where I have thousands and thousands of 4 point polylines in AutoCAD that I need to determine three things for each one. 1) The length between two points and 2) and 3) the angle between two sets of other points.
I found a .lsp routine that exports the coordinates of all the vertices and I know how to write formulas in excel to calculate the values I need based on those points, the problem is that the vertex points are not always the same row. IE Sometimes Pt1 is Pt2 for a different polyline, so this messes all my calculations up. See images below.
This is a sample of the polylines

Values I'm trying to obtain
Sample polylines
results in the data below
Sample data
The handle is the polyline (ie 4 vertices for each polyline).
You'd think it would be simple as using MAX and MIN on the X/Y values but sometimes the angles go the opposite way (see below) so it doesn't work.
Alternative polyline
So my question is, does anyone know how to sort this data so that point 1 is always the top (and then left) point, point 2 is always the top (and then right) point etc. etc.? So I can apply my simple length and trigonometric formulas to determine the values I need?
I have to do this for probably at least 10,000 polylines (and therefore 40,000 vertices) and can't check nearly all of them so it has to be a bit foolproof. All this data will be fed in to a machine for manufacturing.
Happy to supply any other data / info required. Thanks!!!!
submitted by lastguymade to excel [link] [comments]


2021.04.08 19:50 ImaginaryCheetah i'll pay reddit gold (no adds for you) for anyone who is able to code a(n) application/script/LISP/plugin for me... probably simple for people familiar with how to make them, but i am not at all. details in comments!

good afternoon,
i'm certain there's a way to do this, but i'm ignorant in coding anything for autocad.
what would be nothing shy of a miracle for me would be something i can run via command line that would do the following :
  1. set all layers to Continuous Linetype, and Default Lineweight
  2. set all objects on the drawing to ByLayer for color, lineweight, and linetype
  3. bonus! if it would apply the same to objects in embedded blocks

i already regularly use SAC, so i'm at least familiar with loading and running .LSP scripts.
i'm using autocad 2018, if that matters.
thanks.
edit - bounty to ThePlasticSpastic
here's the script i made based on guidance from ThePlasticSpastic :
; no warranty expressed or implied, use at your own risk ; ; set all layers to default lineweight and continuous linetype -layer LW Default * LType Continuous * ; ;set all object properties to bylayer (color, lineweight, linetype) -setbylayer ALL ; ; done 
in case anyone else finds this post and may get use out of it :)
submitted by ImaginaryCheetah to AutoCAD [link] [comments]


2020.10.19 04:26 satish3051992 Issue with flattening a AutoCAD file.

I have an AutoCAD file where the Z coordinates of the polylines, blocks, hatches are not 0. This is leading to several issues while drafting and calculating quantitites. Is there are way I can flatten the whole file to bring the Z coordinate of all the objects to 0?
I have tried several methods like Change-Properties-Elevation- 0, used the superflatten.lsp but nothing seems to work, the lines would not budge at all. Let me know if there is a better way to get all the object in the file to z=0.
submitted by satish3051992 to AutoCAD [link] [comments]


2020.06.18 02:13 jxpxcc [testing] need advice blackbox testing a third-party AutoCAD plug-in

The idea is call some lsp commands from autoCAD plug-in created by a third party. And then save the CAD drawing. Do a comparison with the correct file.
I am new to lsp. I hope someone could illustrate the testing workflow. Or recommend me some helpful tools that I should look into. (ex. CAD core console)
submitted by jxpxcc to AutoLISP [link] [comments]


2020.04.13 17:01 aruntalukdar .lsp or .vlx or .fas to .msi

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?
Thanks.
submitted by aruntalukdar to AutoLISP [link] [comments]


2019.05.24 02:19 matthaan AutoCAD LISP Edit - Layer to ByBlock

Looking for some hopefully simple help to edit an AutoCAD routine I found that nearly works perfectly for what I need, but I don't have any knowledge to make the tweak to it that I need.
Code below works, but it applies to all entities in the block that it's run on. I'd like it to only work on a specific layer inside each block, "OUTLINE". If that layer isn't in the block, it shouldn't do anything.
I don't use AutoCAD daily, so I don't quite have the time to pick up this skill myself and it doesn't hold a whole lot of long term benefit, so I'm hoping someone here can help out.
EDIT: dugBarnz solution below works, but I just realized it only allows single selection of a block. Any way to modify this that I can window/multi-select blocks and have it run on all of them?
Source is an old forum post: https://forums.augi.com/showthread.php?151042-Changing-all-entities-to-color-by-layer-within-blocks-as-well
; Written By: Peter Jamtgaard 12/20/2006 ;^P(or C:BlkByBlock (load "BlkByBlock.lsp"));BlkByBlock (defun C:BlkByBlock (/ colBlockReference ActDoc dprSelection objSelection strBlockName ) (if (setq dprSelection (entsel "\nSelect Block: ")) (progn (setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)) dprSelection (car dprSelection) objSelection (vlax-ename->vla-object dprSelection) ) (vla-StartUndoMark ActDoc) (BlkByBlock objSelection) (entupd dprSelection) (vla-EndUndoMark ActDoc) ) ) (prin1) ) (defun BlkByBlock (objSelection / colBlockReference objBlock strBlockName ) (if (= (type objSelection) 'ENAME) (setq objSelection (vlax-ename->vla-object objSelection))) (if (wcmatch (strcase (vla-get-objectname objSelection)) "*BLOCK*") (progn (vlax-for objBlock (vla-item (vla-get-blocks ActDoc) (vla-get-name objSelection) ) (vla-put-color objBlock 0) ; set color byblock ; (vla-put-linetype EOBJ "ByBlock") if all you want is color byblock ; (vla-put-Lineweight EOBJ -1) if all you want is color byblock ; (vla-put-PlotStyleName EOBJ "ByBlock") if all you want is color byblock ) ) ) (prin1) ) (prin1) 
submitted by matthaan to CodingHelp [link] [comments]


2019.04.18 07:07 shichae Export ACAD table/schedule into an Excel spreadsheet

Have you ever wanted to take a table or schedule in AutoCAD and export it to an Excel Spreadsheet? I've always wanted some way to do this for years but have always been too lazy to look for a way or it was just easier to manipulate the text in ACAD. For me, the text editing capabilities in Excel are superior, and sometimes it's easier to let an engineer or project manager manipulate a spreadsheet that is linked into a drawing. Enough with reasons why I've wanted this capability, and on to what I found after finally taking the time to search the net. Found this LISP code on Cadalyst, and after opening up the LSP file to see the guts of the code, I am awe struck by the depth of code needed to accomplish this task.
TLDR: load the TE_TableExport.lsp program, then invoke it using the TE command. You'll see the table change in AutoCAD for a split second, and then an instance of Excel should start as the code begins the population process.

https://cadtips.cadalyst.com/tables/export-table-lines-and-text-excel?q=tables/export-table-lines-and-text-excel
submitted by shichae to AutoCAD [link] [comments]


2019.01.06 01:25 Aggkat CorelCad vs BricsCad vs Draftsight

I have been an Autocad user for over 25 years. I work full time as a pipe designer and draw houses on the side. I used to own Architecture Desktop, but I got tired of Autodesk going up on subscription and the price got out of hand for no more money than I make on the side drawing houses. I quit my subscription after paying $8000 and about 12 years of subscriptions. Anyway I'm looking for alternatives. I downloaded CorelCad and works just like Autocad. I was able to bring in my blocks and lsp routines with no problems. Also able to go back and forth between it and autocad flawlessly. I have heard good things about Bricscad but have not tried it yet. Letting Corel expire first. Kinda little bit worried that they will start doing like Autodesk now that they have been bought by Hexagon. Looks like price already went up from last year. Also heard alot about Draftsight which uses same Graebert engine. It appears it doesn't do any 3D. I draw a lot of piping and mechanical in 3D, but I like 2D for houseplans. I don't mind doing them in 3D, but customer always tend to look at the model and worry more about the wall tecture or color than they do the design. Im a home designer not and interior decorator!
So I was wondering how may people used each and your opinions on them.
submitted by Aggkat to cad [link] [comments]


2018.08.09 21:49 dannytsg IWTL how to write AutoLisp programmes to develop my AutoCad efficiency

I work as an engineer and I am always looking forward to diversify and create workload efficiencies.
I’ve recently been introduced to AutoLisp (.lsp) programmes that can be written and used within AutoCaD to perform pretty much and function you may require.
I want to learn how to write AutoLisp programmes that are useful and pertinent to my work to help my colleagues and I be more efficient and work smarter.
submitted by dannytsg to IWantToLearn [link] [comments]


2017.08.31 04:13 StaggsOnDeck Autocad FX.lsp Questions. Girlfriend Needs Help!

Girlfriend is having problems using autocad's FX.lsp. Does anyone use this .lsp or have helpful resources? Much appreciated! Tried to get her to make an account and join the community but her stubborness won. Can you guys show her how helpful reddit can be?
submitted by StaggsOnDeck to cad [link] [comments]


2017.07.28 02:19 acloudrift AutoCAD Lisp routines (each *.lsp file is ready to load) (click on the second line in grey to open folder)

AutoCAD Lisp routines (each *.lsp file is ready to load) (click on the second line in grey to open folder) submitted by acloudrift to acloudrift [link] [comments]


2016.04.09 20:14 3dsplinter Does anyone know of an autocad plug-in or lsp that compares 2 versions of the same drawing and lets you know of changes?

submitted by 3dsplinter to AutoCAD [link] [comments]


2016.03.09 21:38 Lorenzvc Autolisp in autocad - how to run a subroutine from a programmed lisp?

Hello. This might be a little hard to explain since I'm not at work, or have the LSP in front of me.. but some of you might be able to help me.
the company I work for has a bunch of .LSP files, programmed by an external company. So we are kind-of depending on their availability, and have to pay them to change stuff.
I'm trying to run a script on a few drawings, that execute part of their bought lisp-code.
The problem is, I don't know what command my .scr (script) should enter in autocad, to run the part of the code I need..
The code starts with something like this.
 (defun c:rcirc 
which can be called from the command-bar. But the function I need , is way below that, and can't be called by simply typing that word..
(defun test ... 
So.. I actually want to run part of the already loaded LISP, by a script. Which command can allow me to run something inside a lispcode? Should I simply add c: to define it? or..
Sorry if I'm not being clear, can provide more info tomorrow!
submitted by Lorenzvc to cad [link] [comments]


2016.01.19 02:20 acloudrift Free AutoCAD Lisp routines, anyone interested?

I have several Lisp routines written about 25 years ago. They probably still work in recent versions of AutoCAD, I don't know. I don't know how to profit from these, but I had much satisfaction out of creating them. I wonder if there is any interest in copying them into text posts for anyone to try?
Jan. 23, 2016 I'm ready to post. OutOfTime007 suggested I post to GitHub, but that proved to be too much of a challenge. So I'm posting right here, to comments. All of the items should be saved as data type txt, but the code files must have extension .lsp for AutoCAD to load them. There are a few reference files for programmers. Never mind what the text looks like in the comment display, just copy/paste to Notepad (or equivalent). A semicolon (;) hides the remainder of the line from the lisp interpreter. Otherwise, even if the pasted display does not look like my original, it should work ok, the lisp interpreter ignores line returns. It's just that, if you like to read the code, having no short lines nor indents makes it very difficult to follow.
I tried to submit a lisp help file, but it is too long for comments. If you are interested, maybe there is another way to transfer it?
Edit: Files were moved to Gdrive: https://drive.google.com/file/d/0B0UcUtfx2_QBVWhvWWpaMkQ2VTQ
submitted by acloudrift to cad [link] [comments]


http://swiebodzin.info