All Activity
- Past hour
-
Objects move away from Basepoint with Move Parameter (and they shouldn't)
ColinPearson replied to ColinPearson's topic in AutoCAD 2D Drafting, Object Properties & Interface
disregard LOL -
ColinPearson started following Objects move away from Basepoint with Move Parameter (and they shouldn't)
- Today
-
Objects move away from Basepoint with Move Parameter (and they shouldn't)
ColinPearson posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
Hello World. I've used all the swear words I know and this block still won't behave! When I use the Move grip and pull this block all the way up, it should extend by 5-7/8" ... instead it extends by 5-3/4" and also moves 1/8" from the Basepoint. Any clue what's going on here? Thanks in advance y'all!!! jack.dwg -
Hi DATVO. Yes , I update my code to work only for the left side every time.How you do it? Can you post the code? Thanks
-
Copy blocks to curve according to another curve
devitg replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
@HypnoS,, Glad to know. My version do not INSERT , just copy as you asked at the OP. Seem to be you need to make RISERS.- 36 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
DATVO started following Help with the code : 2d stair
-
Sorry, I placed my phone in my pocket without locking the screen. Mod @SLW210, please delete this post.
-
AutpLisp to Create X,Y Coordinates with Mleader
SLW210 replied to kathir's topic in AutoLISP, Visual LISP & DCL
The OP disappeared without answering any questions. -
How solid and safe is block handle in output of ATTOUT?
pefi replied to pefi's topic in AutoCAD 2D Drafting, Object Properties & Interface
A word of warning, bedit/attsync might change the block handles, but not always. I'm not sure what triggers it. -
Block definition modification - adding 2 attributes.
pefi replied to pefi's topic in .NET, ObjectARX & VBA
Thank you very much BIGAL!! I really appreciate it! I didn't run the code yet, but I analysed it - are there 2 redundant procedures? ColumnRow and Alfa2Number that is only used in ColumnRow? -
-
How to stop flip action reversing offsets in dynamic block
BIGAL replied to jamami's topic in AutoCAD Drawing Management & Output
I will add the set property later but this is front end as an example, just copy all the code and paste to command line . (defun wow ( / fo ) (setq fo (open (setq fname (vl-filename-mktemp "" "" ".dcl")) "w")) (write-line " dyntruss : dialog { " fo) (write-line " label = \"Enter Values\" ; " fo) (write-line " : column { " fo) (write-line " width =25; " fo) (write-line " spacer_1 ; " fo) (write-line " : edit_box { " fo) (write-line " key = \"key1\" ; " fo) (write-line " label = \"Length \" ; " fo) (write-line " edit_width = 5; " fo) (write-line " edit_limit = 4; " fo) (write-line " is_enabled = true ; " fo) (write-line " allow_accept=true ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " : edit_box { " fo) (write-line " key = \"key2\" ; " fo) (write-line " label = \"Angle \" ; " fo) (write-line " edit_width = 5; " fo) (write-line " edit_limit = 4; " fo) (write-line " is_enabled = true ; " fo) (write-line " allow_accept=true ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " : radio_row { " fo) (write-line " : radio_button { " fo) (write-line " key = \"Rb1\" ; " fo) (write-line " label = \"Flipped\" ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " : radio_button { " fo) (write-line " key = \"Rb2\" ; " fo) (write-line " label = \"No Flip\" ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " ok_cancel ; " fo) (write-line " } " fo) (write-line " } " fo) (close fo) (setq dcl_id (load_dialog fname)) (if (not (new_dialog "dyntruss" dcl_id) ) (exit) ) (set_tile "key1" "10") (set_tile "key2" "0") (set_tile "Rb1" "1") (action_tile "accept" "(setq val1 (atof (get_tile \"key1\")))(setq val2 (atof (get_tile \"key2\")))(setq val3 (get_tile \"Rb1\"))(done_dialog)") (action_tile "cancel" "(setq cancel \"yes\")(done_dialog)") (start_dialog) (unload_dialog dcl_id) (vl-file-delete fname) (if (= val3 "1")(setq visibilty "Flip")(setq visibilty "Noflip")) (princ) ) (wow) -
Copy blocks to curve according to another curve
HypnoS replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
Thanks @devitg it works great!- 36 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
Anyone see a routine in their travels that does this? (block numbering)
BIGAL replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
Maybe this. Does numbers and alphas, as well as a square or circle. Pt num bubble.lsp -
Adding data to property lookup tables
BIGAL replied to jamami's topic in AutoCAD Drawing Management & Output
You don't use a look up table, as you mentioned just answer the question for length, then add the various blocks selecting the visibility state, you insert the block then call the dcl so can pick which visibility you want then its updated much easier that picking the Blue square and then selecting visibility. Post a new sample dwg with the separate blocks maybe a couple of different structures. Then can look at automating it. - Yesterday
-
Pan without losing current viewport zoom scale
troggarf replied to rcb007's topic in AutoLISP, Visual LISP & DCL
-
AutpLisp to Create X,Y Coordinates with Mleader
Tharwat replied to kathir's topic in AutoLISP, Visual LISP & DCL
... And the system variable would still remains you set it firstly. Right? -
Hi I am writting a lisp to draw 2d stair. The idea is to select the fist step --> move it to layer STAIR then pick two points for the length of the stair and give the number of the steps. Then the code draw the stair with direction arrow in the middle. The code work perfect if i select the two points only from the one side of the stair. Is not all the time the left or the right side depends of the rotation. Can any one help me to update the code to work for bouth sides and don't misalign the steps. Here is the code . By the way i use ZWCAD. (defun c:Stair2D (/ p1 p2 ent ent_data step_start step_end step_vec stair_vec num_steps i base_pt new_p1 new_p2 mid1 mid2 last_base last_p1 last_p2 arrow_p1 arrow_p2 arrow_p3) (vl-load-com) (setvar "CMDECHO" 0) (command "._UNDO" "_BEGIN") (if (not (tblsearch "LAYER" "STAIR")) (command "_layer" "_m" "STAIR" "_c" "90" "" "") ) (setvar "CLAYER" "STAIR") (princ "\nSelect the first step of the staircase: ") (while (not (setq ent (ssget ":S" '((0 . "LINE"))))) (princ "\nTry again!! ") ) (command "._CHANGE" ent "" "_P" "_LA" "STAIR" "") (setq ent_data (entget (ssname ent 0))) (setq step_start (cdr (assoc 10 ent_data))) (setq step_end (cdr (assoc 11 ent_data))) (setq step_vec (mapcar '- step_end step_start)) (setvar "OSMODE" 1) (setq p1 (getpoint "\nSelect the start of the staircase: ")) (setq p2 (getpoint p1 "\nSelect the end of the staircase: ")) (setvar "OSMODE" 0) (initget 7) (setq num_steps (getint "\nEnter the number of steps: ")) (setq stair_vec (mapcar '(lambda (a b) (/ (- b a) num_steps)) p1 p2)) (setq i 1) (while (<= i num_steps) (setq base_pt (mapcar '+ p1 (mapcar '(lambda (x) (* x i)) stair_vec))) (setq new_p1 base_pt) (setq new_p2 (mapcar '+ base_pt step_vec)) (command "._LINE" new_p1 new_p2 "") (setq i (1+ i)) ) (setq mid1 (mapcar '(lambda (a b) (/ (+ a b) 2.0)) step_start step_end)) (setq last_base (mapcar '+ p1 (mapcar '(lambda (x) (* x num_steps)) stair_vec))) (setq last_p1 last_base) (setq last_p2 (mapcar '+ last_base step_vec)) (setq mid2 (mapcar '(lambda (a b) (/ (+ a b) 2.0)) last_p1 last_p2)) (command "._line" mid1 mid2 "" "" "_N") (command "._CIRCLE" mid1 0.06) (setq mid1mid2_vec (mapcar '- mid2 mid1)) (setq mid1mid2_length (distance mid1 mid2)) (setq unit_vec (mapcar '(lambda (x) (/ x mid1mid2_length)) mid1mid2_vec)) (setq perp_vec (list (- (cadr unit_vec)) (car unit_vec) 0.0)) (setq arrow_p1 (mapcar '+ mid2 (mapcar '(lambda (x) (* x 0.10)) unit_vec))) (setq arrow_p2 (mapcar '+ mid2 (mapcar '(lambda (x) (* x -0.15)) perp_vec))) (setq arrow_p3 (mapcar '+ mid2 (mapcar '(lambda (x) (* x 0.15)) perp_vec))) (command "._LINE" arrow_p1 arrow_p2 "") (command "._LINE" arrow_p1 arrow_p3 "") (command "._UNDO" "_END") (setvar "CMDECHO" 1) (setvar "CLAYER" "0") (princ) ) Thanks Drawing2.dwg
-
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. -
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- 36 replies
-
- 1
-
-
- 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.- 36 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?- 36 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