Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/15/2021 in all areas

  1. Here is my attempt. (defun Get:Duplicates ( l / f n) (mapcar '(lambda (x) (and (setq f (member x l)) (member x (cdr f)) (or (member x n) (setq n (cons x n)))) ) l) (reverse n) )
    1 point
  2. my bad was missing a ")" (defun C:UhCreate3dPoint (/ pt z desc) ;Points Creation >Prompt For Elevations > Manual ; Udo Huebner for Autodesk forum (while (setq pt (getpoint "\nPick a Point: ")) (setq z (caddr pt)) (or (setq desc (vlax-ldata-get "Points" "Description")) (setq desc "")) (setq desc (getstring 'T (strcat "Description <" desc ">:"))) (vlax-ldata-put "Points" "Description" desc) (command-s "-CreatePointManual" pt pause desc z) ;pause to enter point name ) (princ) ) Updated the code a bit to use LDATA. This has the added benefit of remembering the last description used if you save the file.
    1 point
  3. Steven, BIGAL I'm sorry if I couldn't express myself in a better way. I use similar approaches to what you're kindly/generously proposing in other instances, but this time situation is different hence the initial question. I guess unfortunately this will remain as an unanswered one by now...
    1 point
  4. Masterclass in how to win friends and influence people..... To be honest if BigAl doesn't have in the back of his mind a solution then there probably isn't one and what he is offering will work if you can persuade yourself and others to save LISP files in trusted locations... which AutoCAD can search through. How many LISPS and apps do you have loaded by the way, might be just as quick noting down the file paths manually and gong that way. The only other option is outside of AutoCAD to do a windows search for LISP files on a drive and go that way, Excel can do this as a Macro and return a list of files in a location
    1 point
  5. Rather than use CIV3D try this it will label a point. (defun c:labpts ( / pt x y z ) (command "-layer" "m" "PointsRL" "") (setvar 'textstyle "standard") (setq oldsnap (getvar 'osmode)) (setvar 'osmode 8) (while (setq ent (entsel "\npick point Enter to exit")) (setq pt (cdr (assoc 10 (entget (car ent))))) (setq x (car pt) y (cadr pt) Z (caddr pt)) (setq pt (list x y 0.0)) (command "Text" pt 2.5 0.0 (strcat "X= " (rtos x 2 3) " Y= " (rtos y 2 3) " Z= " (rtos z 2 3))) ) (setvar 'osmode oldsnap) (princ) ) This is write the RL of a CIV3D cogo pt. (defun CIV3DPTHT ( / pt1 ht pt oldlay oldtext ) (alert "Pick CIV3D points press ESC or pick nothing to exit") (while (setq obj (vlax-ename->vla-object (car (entsel)))) ; vl 3d point convert to plain lisp (setq pt1 (vlax-safearray->list (vlax-variant-value (vlax-get-property obj "Location")))) (setq ht (rtos (nth 2 pt1) 2 3)) ; Z val (setq pt (list (nth 0 pt1)(nth 1 pt1))) ; XY (setq oldtext (getvar "textstyle")) (setq oldlay (getvar "clayer")) (command "Layer" "n" "Pointhts" "c" 1 "Pointhts" "s" "pointhts" "") ; put text on new layer ; iso 2.5 annotative text (if (setvar "textstyle" "ISO2.5") (command "TEXT" pt 0 ht) (alert (strcat "The style ISO2.5 annotative does not exists" "\nplease create and run again")) ) (setvar "textstyle" oldtext) (setvar "clayer" oldlay) ) ; end while (princ) ) ; end defun (CIV3DPTHT) I have numerous other CIV3D stuff PM me a email will send details.
    1 point
  6. Hi my language is not good So please attach a drawing explaining what is required
    1 point
  7. Hey Berzerker. Long time, no see. Looks like you already figured it out, but I remember having this same issue back when I used to do 3D work in Autocad. The first material acts like a global material and gets applied to everything, as you saw. So I always left that material blank and created new materials for each object.
    1 point
  8. after seeing how the command wants its data try the following. (defun C:UhCreate3dPoint (/ pt z) ;Points Creation >Prompt For Elevations > Manual ; Udo Huebner for Autodesk forum (setq prevdesc "") (while (setq pt (getpoint "\nPick a Point: ")) (setq z (caddr pt)) (if (= "" (setq desc (getstring 'T (strcat "Description <" prevdesc ">:")))) (setq desc prevdesc) ;else (setq prevdesc desc) ) (command-s "-CreatePointManual" pt pause desc z) ;pause to enter point name ) (princ) )
    1 point
  9. I don't have Civil 3D to test but looking at the lisp. it says ";Points Creation >Prompt For Elevations > Manual" manually type the "-CreatePointManual" command and see what its prompting for. then modify the lisp to meet your needs. might be as simple as adding another "" IDK. ("" in lisp simulates an enter key press or picks the default option) (command-s "-CreatePointManual" pt "" "") to (command "-CreatePointManual" pt "" "" "") I don't see where the user description of the point is being called. so that might also be a thing to add above. I never really use command-s either.
    1 point
  10. Read the comments in the routine for more info. (if (setq ss (ssget "_X" '((0 . "*DIMENSION")))) (repeat (setq in (sslength ss)) (setq ent (entget (ssname ss (setq in (1- in))))) (if (member '(100 . "AcDbRotatedDimension") ent) ;; if this GC is existed among DXF codes then its Rotated Dim. (progn ;; run your stuff here .... ) ) ) )
    1 point
×
×
  • Create New...