All Activity
- Past hour
-
AutpLisp to Create X,Y Coordinates with Mleader
DATVO replied to kathir's topic in AutoLISP, Visual LISP & DCL
First, the code sets CMDECHO to 0 to prevent program from displaying commands like MLEADER or its interactions in the command line. This helps keep cleaner while the program runs. At the end of the program, the code resets CMDECHO to 1, which is AutoCAD's default setting. I copied my old file into this one, so I probably forgot to remove that line. But in this code, it's not necessary. The command will cancel. -
AutpLisp to Create X,Y Coordinates with Mleader
Tharwat replied to kathir's topic in AutoLISP, Visual LISP & DCL
Good start. A few points if you like: - what would happen if a user pressed ESC while Mleader command is active? - What's the need of function vl-load-com in your routine? - You assumed that the system variable CMDECHO was set to 1 but it could be the contrary. - Today
-
How to stop flip action reversing offsets in dynamic block
jamami replied to jamami's topic in AutoCAD Drawing Management & Output
Problem is we cannot always set the length prior to flip as we need to find the right size after the flip. I am trying a few different methods hopefully I can get this to work -
Copy blocks to curve according to another curve
devitg replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
@HypnoS use the previous, reattached, It will ask for distance only once , and ask for the straight line start point to paste each block cpy-blk-2-poly.lsp copy block 2 poly 2025-08-05 10-37-41.rar- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
AutpLisp to Create X,Y Coordinates with Mleader
DATVO replied to kathir's topic in AutoLISP, Visual LISP & DCL
Here's the code. I hope this helps you. The MLeader style follows your current style. Looking for tools to speed up your workflow? Explore this resource: https://lispautocad.gumroad.com/l/eezilo (defun C:DV_MLP (/ pt x y text) (vl-load-com) (setvar "CMDECHO" 0) (setq pt (getpoint "\nPick point: ")) (if pt (progn (setq x (rtos (car pt) 2 3)) (setq y (rtos (cadr pt) 2 3)) (setq text (strcat "(" x " ; " y ")")) (command "._MLEADER" pt pause text) ) (princ "\nNo Point selected!") ) (setvar "CMDECHO" 1) (princ) ) -
mhupp started following Anyone see a routine in their travels that does this? (block numbering)
-
Anyone see a routine in their travels that does this? (block numbering)
mhupp replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
Think this can also be done with dynamic blocks less automated but will prompt you for inputs when inserted into a drawing. -
Copy blocks to curve according to another curve
HypnoS replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
Now that I think about it... let's assume there will be multiple attributes.- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
Copy blocks to curve according to another curve
SLW210 replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
There has to some consistency in what's being sorted. Will there always be just one attribute?- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
There are several LISPs and programs around for cable trays. @Tharwat has a program. Cable tray program | Tharwat Al Choufi Here's a thread on T-Connections... Draw cable tray T connection - AutoLISP, Visual LISP & DCL - AutoCAD Forums
-
How to stop flip action reversing offsets in dynamic block
SLW210 replied to jamami's topic in AutoCAD Drawing Management & Output
No time for me to look at your blocks, but have you looked into constraints? I have some dynamic block with lots of actions and even constrained if you do things in a weird order they can get a little off. So make sure length is set before the flip action. Probably could constrain them more or different. I don't know. I'll see what time I have today, but I am at work for a shorter time today than usual. -
Copy blocks to curve according to another curve
HypnoS replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
well I hoped for this lisp to work with any blocks with attributes. here are the same b locks Im using. example [2].dwg- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
AutoCAD gets strange sometimes when objects get far away from 0,0,0. That's all I can come up with.
-
Anyone see a routine in their travels that does this? (block numbering)
SLW210 replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
TCOUNT Express Tool. There used to be quite a few LISPs and Programs around to do that, you'll need to find one that suits your needs best. I use Lee Mac's from time to time. AutoCAD Mechanical has Balloon which works with a BOM and all sorts of options. -
Copy blocks to curve according to another curve
SLW210 replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
My code only gives that error if there are letters in the ATTRIBUTE, works no errors on the drawing you posted. Maybe you should post an actual drawing that you are using this on. Even the images you posted are different by a lot from the drawing you posted.- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
Dynamic Block w/Rotation and Stretch
DATVO replied to Bill Tillman's topic in AutoCAD Drawing Management & Output
Is this what you're looking for ? DynBlock101_modified.dwg -
Copy blocks to curve according to another curve
HypnoS replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
@devitgcode acts weird. It asks me to type distance,and when I do it places only one block and asks for distance again to pace another block, and on and on.- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
Anyone see a routine in their travels that does this? (block numbering)
CivilTechSource replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
This is a good video that explains lisp and how to do autocount block -
DATVO started following Pan without losing current viewport zoom scale
-
Pan without losing current viewport zoom scale
DATVO replied to rcb007's topic in AutoLISP, Visual LISP & DCL
You may consider using this tool, which enables viewport panning with a customizable layer interface, retains coordinate memory, and functions even when the viewport is locked. I hope this helps you: https://lispautocad.gumroad.com/l/bgesj -
When copying layouts from one drawing to another the viewport layers change
DATVO replied to Steve Daley's topic in AutoCAD Drawing Management & Output
If your original drawing has saved Layer States, you can: - Open the original drawing. - Go to Layer Properties Manager → click Layer States Manager. - Export the layer state. - In the new drawing, import that layer state and apply it to the viewport. This preserves layer visibility, color, linetype... - Yesterday
-
where are experts of autocad no answer since five days
-
Adding data to property lookup tables
jamami replied to jamami's topic in AutoCAD Drawing Management & Output
I agree with separating the constituent parts . have broken the assembly into separate dynamic blocks so that the central trusses, roof tracking , edge beams and ridge units are separate dynamics . I have run into a few issues that I have uploaded as a new thread . ive tried running the lisp above but struggling to see how I can use this to add data to the lookup tables?? -
jamami started following How to stop flip action reversing offsets in dynamic block
-
How to stop flip action reversing offsets in dynamic block
jamami posted a topic in AutoCAD Drawing Management & Output
I have developed the attached dynamic block which positions nested blocks according to the distance value set in a block properties table. To avoid text mirroring of the nested block labels I have used attributes and added a flip action. This all works well until I try and change the length after a flip. It appears the xpos value in the block properties table is applied as positive despite the flip state. I have tried changing the point parameters to stretch parameters but have similar problems, especially when rotating the assembly to different angles. I was hoping something as simple as adding a formulae into the block properties table ie dist*flipstate would work but there doesn't seem to be anyway to do this. Is there a way to solve this? jam3.dwg -
Copy blocks to curve according to another curve
devitg replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
@HypnoS Find attached cpy-blk-2-poly-01.lsp- 34 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
Anyone see a routine in their travels that does this? (block numbering)
ILoveMadoka replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
Should have known.... LeeMac -
ILoveMadoka started following Anyone see a routine in their travels that does this? (block numbering)
-
Anyone see a routine in their travels that does this? (block numbering)
ILoveMadoka posted a topic in AutoLISP, Visual LISP & DCL
Not sure how to even frame the question... Given a block like this: If it is inserted and is the first instance, change the text to 01, each additional insert will be numbered based upon the total number of that particular block being inserted. Can the text be text/mtext or would it have to be an attribute? I suppose it would search the block table when it is run and number additional inserts based upon the total existing in the drawing at the time of the insert. Has anyone seen such a routing/proggie that does that? If I used diesel (or other) could the numbers update automatically if one is deleted either by regen or some other trigger? Based upon their order within the blocktable? I do not even know how to search on something like this... Since I figured something would have to be written, I asked here but other forums might know of solutions..