Jump to content

Leaderboard

  1. BIGAL

    BIGAL

    Trusted Member


    • Points

      5

    • Posts

      20,027


  2. ReMark

    ReMark

    Trusted Member


    • Points

      5

    • Posts

      46,317


  3. SLW210

    SLW210

    Moderator


    • Points

      3

    • Posts

      11,553


  4. Lee Mac

    Lee Mac

    Trusted Member


    • Points

      2

    • Posts

      21,098


Popular Content

Showing content with the highest reputation since 03/10/2026 in Posts

  1. Your points will fall on the grid lines not inside the boxes created by the grid lines.
    2 points
  2. I've been using already THANKS. I promise this might be my last change. Can you add +distsance just extend the last line that additional amount?
    1 point
  3. @mhupp great code no reason why input could not be 7.7;-12;22.8;12;-5.9;21.6;-0.5;\3.5;8;2.5;\1.5;13.8 in this case each leg is separated by a semi colon, or more often a comma is used. Could type in say notepad and copy and paste to a getstring. The reason for the paste rather than type direct would be if made a mistake you UNDO fix in notepad and do again. Use "parse to list" defun. @Ataim what do you think about that idea ?
    1 point
  4. If I understand correctly your request, I think you can get the same with the right settings. Just aim the desired direction and specify the distance.
    1 point
  5. Just my $0.05 there was another post about doing breaklines maybe at Forums/autodesk/lisp. One answer provided had multiple break styles that looked very useful. I will spend a couple of minutes and see if I can find the link.
    1 point
  6. Sorry, I've been out hiking. It appears to be correct. Question: Have you already calculated the location of the 80 ft. contour that occurs between the spot elevations of 88.9 and 93.8? There is also a 100 ft. contour and a 110 ft. contour that starts on the same grid line.
    1 point
  7. If I understood the request correctly... This could be a design start, it uses the oblique block of the dimension. (vl-load-com) (defun circle2lw (e / dxf_ent pt_cen radius fst_pt opp_pt) (setq dxf_ent (entget e) pt_cen (cdr (assoc 10 dxf_ent)) radius (cdr (assoc 40 dxf_ent)) fst_pt (polar pt_cen 0.0 radius) opp_pt (polar pt_cen pi radius) ) (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") (assoc 67 dxf_ent) (assoc 410 dxf_ent) (assoc 8 dxf_ent) (if (assoc 6 dxf_ent) (assoc 6 dxf_ent) '(6 . "BYLAYER")) (if (assoc 62 dxf_ent) (assoc 62 dxf_ent) '(62 . 256)) (if (assoc 370 dxf_ent) (assoc 370 dxf_ent) '(370 . -3)) (if (assoc 48 dxf_ent) (assoc 48 dxf_ent) '(48 . 1.0)) '(100 . "AcDbPolyline") '(90 . 2) '(70 . 1) (cons 43 0.0) (cons 38 (caddr fst_pt)) (if (assoc 39 dxf_ent) (assoc 39 dxf_ent) '(39 . 0.0)) (cons 10 (list (car fst_pt) (cadr fst_pt))) '(40 . 0.0) '(41 . 0.0) '(42 . 1.0) (cons 10 (list (car opp_pt) (cadr opp_pt))) '(40 . 0.0) '(41 . 0.0) '(42 . 1.0) (assoc 210 dxf_ent) ) ) (entdel e) (entlast) ) (defun c:Mybreak ( / ent obj_brk pt_brk vlaobj pr deriv alpha) (setvar "DIMBLK" "oblique") (while (setq ent (entsel "\nBreak point: ")) (setq obj_brk (car ent)) (cond ((member (cdr (assoc 0 (entget obj_brk))) '("POLYLINE" "LWPOLYLINE" "LINE" "ARC" "CIRCLE" "ELLIPSE" "SPLINE" "XLINE" "RAY")) (setq pt_brk (cadr ent)) (if (eq (cdr (assoc 0 (entget obj_brk))) "CIRCLE") (setq obj_brk (circle2lw obj_brk))) (setq vlaobj (vlax-ename->vla-object obj_brk)) (initget 1) (setq pt_brk (vlax-curve-getClosestPointTo vlaobj (trans pt_brk 1 0) nil ) pr (vlax-curve-GetParamAtPoint vlaobj pt_brk) deriv (vlax-curve-getFirstDeriv vlaobj pr) alpha (atan (cadr deriv) (car deriv)) ) (command "_.break" obj_brk "_none" pt_brk "_none" pt_brk) (initget 1) (command "_.-insert" "_oblique" "_scale" (distance (trans pt_brk 0 1) (getpoint (trans pt_brk 0 1))) (trans pt_brk 0 1) (angtos alpha (getvar "AUNITS") 13)) ) (T (princ "\nThis object can't be break!")) ) ) (princ) )
    1 point
  8. You might try Lee Mac's Steal from Drawing | AutoCAD | Autodesk App Store. I just do a SAVE or SAVEAS on the drawing and make a new exact COPY of the drawing. If I have similar drawing that could use the other viewport and settings, I just drag the Layout from one drawing to the other with Design Center. There is an Export Layout to Model... when you right-click a Layout TAB and before that option was in AutoCAD there were some programs that would do that. To do what you want looks to be a lot of work for a LISP.
    1 point
  9. You need to use ERASE to remove items in order for OOPS to actually restore it.
    1 point
  10. Command CBL: puts the Breakline symbol 4.0 units from the start, the breakline symbol is 1.0 units wide, and the tip is 0.4 units up or down the line. Obviously feel free to change those values. command CBLU: Same, except the user must give all the values. ;; Custom Breakline ;; @params ;; ps: start point ;; pe: end point ;; gap: gap between the two halves of the lines ;; loc: location of the center of the gap ;; tip: vertical size of the tip of the breakline symbol (default there's is 70° angle, but we'll give tip size) (defun CustomBreakLine ( ps pe gap loc tip / angl dst pline pl pd pm pu pr ) (setq angl (angle ps pe)) ;; angle (setq dst (distance ps pe)) ;; distalce of the line (without the breakline symbol) (setq pm (polar ps angl loc)) ;; mid point of the gap (setq pl (polar ps angl (- loc (/ gap 2.0)))) ;; left point of the breakline symbol (setq pr (polar ps angl (+ loc (/ gap 2.0)))) ;; right point of the breakline symbol ;; down tip of the breakline symbol (setq pd1 (polar pl angl (/ gap 4.0))) (setq pd (polar pd1 (- angl (d2r 90.0) ) tip)) ;; up tip of the breakline symbol (setq pu1 (polar pm angl (/ gap 4.0))) (setq pu (polar pu1 (+ angl (d2r 90.0) ) tip)) (setq pl (drawLWPoly (list ps pl pd pu pr pe) 0)) ) ;; degree to rad (defun d2r (d / ) (/ (* pi d) 180.0) ) ;; Returns the middle of two points (defun mid-pt (p1 p2) (polar p1 (angle p1 p2) (/ (distance p1 p2) 2.) ) ) ;; makes a polyline object with entmakex (defun drawLWPoly (lst cls) (entmakex (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 (length lst)) (cons 70 cls)) (mapcar (function (lambda (p) (cons 10 p))) lst))) ) ;;;;;;;;;;; ;; Custom BreakLine, User input values (defun c:cblu ( / ps pe gap loc tip ) (CustomBreakLine (setq ps (getpoint "\nStart pont: ")) (setq pe (getpoint ps "\nEnd pont: ")) (setq gap (getdist "\nGap distance: ")) (setq loc (getdist "\nLocation of the gap center (enter value, or select two points: start point + point of the gap): ")) (setq tip (getdist "\nTip height: ")) ) (princ) ) ;; Custom BreakLine, preset values (defun c:cbl ( / ps pe gap loc tip ) (CustomBreakLine (setq ps (getpoint "\nStart pont: ")) (setq pe (getpoint ps "\nEnd pont: ")) (setq gap 1.0) (setq loc 4.0) (setq tip 0.4) ) (princ) ) (princ "\nCommand CBL for Custom BreakLine: ") (princ) Happy with this?
    1 point
  11. That's because you need to do something before issuing the oops command. I think there is a thread here differentiating oops and undo command.
    1 point
  12. You created this thread before even trying it in your AutoCAD?
    1 point
  13. Did you google found lots of ideas.
    1 point
  14. In this link, it's written that OOPS command exist : In AutoCAD since version ≤ R12...
    1 point
  15. Bit odd yes tested in Bricscad, I will look at the getcellextents, this gives the XY position of the corners of the table cell. If the line is 69 times repeated it sounds like that is the problem. I will make a little test program so can look at what is going on when calculating the Pt1 and Pt2. the code is done that way so if row height is changed for other users the lines are still central in the cell. Add the (princ line and look at the Y value displayed, it should change for every row. Please let me know if it is not changing. (setq pt2 (list (nth 6 pts)(nth 7 pts) 0.0)) (princ (strcat "\n" (rtos (cadr pt1) 2 3) " ")) (setq vdist (/ (- (cadr pt1) (cadr pt2)) 2.0)) Another test could some one try on Acad. 0 is 1st column. (setq objtable (vlax-ename->vla-object (car (entsel "\nPick a table ")))) ; put a number like 3+ in row variable ; then copy this line to command line change the 3 etc to 4 5 6 and so on ; The Y value should change (setq pts (vlax-safearray->list (vlax-variant-value (VLA-GETCELLEXTENTS objtable 3 0 :vlax-false))))
    1 point
  16. In other words, you are having trouble understanding the concept of interpolation, correct? The mathematical interpolation of contours goes like this. Let's say we have two spot elevations A & B. A = 32.7 and B = 54.0. The distance between A & B = 50 feet. We want to know where our 40-foot contour would fall between spot elevations A & B. First obtain the total elevation difference. This is done by subtracting A from B. 54.0 minus 32.7 = 21.3. Next, we want the difference in elevation between our 40-contour interval and the nearest spot elevation which in this case is A or 32.7. That works out to be 7.3. Now we need to calculate the distance (let's call this "d") we need to go from spot elevation A to our 40-foot contour. That takes the form of: d/7.3=50/21.3 or d=7.3*50/21.3 = 7.3*2.347 = 17.13 or the distance, in decimal feet, to our 40-foot contour. Got all that? Good. Now go start interpolating.
    1 point
  17. Not sure if this will work the way you want. I created a dummy drawing with a dummy block and a dummy attribute. When you set the attribute to Invisible, you can't see it any more, but you can edit it. I know, that's not what you want. I include it so you don't waste time trying it for yourself. When you set the attribute to Constant, you can't edit it at all. It no longer shows up in the Properties, and it doesn't show up in the block. If you change the attribute back to not constant, you can insert a new block and give it a different value, but it's still invisible and it does show up in Properties. Could be a bug? Or the way I handled it.
    1 point
  18. If you ask the originator for the LISP file, that is the best way.
    1 point
  19. That's not going to happen on here. Did you read the entire thread? Why do you need it as a .lsp? Tell us what it does and maybe there is a non-.fas version?
    1 point
  20. If BIGAL's last post is not what you want, i.e. you want to "convert .fas to .lsp" as per your original post, then: Effectively what you're asking is the same thing as asking for someone to change the ACAD.EXE file into the .H & .CPP files which AutoDesk had hundreds of programmers create for them. That is usually (if not always) illegal! Most of us here are programmers (at least amateur), so we know just how much time / effort can go into a program. Some of our programs we "give-away" for free by simply posing the source LSP files (or other sources). However, if we want to make money out of our "work", we would generally not give away the source files. Thus we'd "compile" them into FAS/VLX/DLL/ARX/etc. so that they will still run but not be editable by the users. Now in most cases, if you see a FAS file and you don't have the original LSP file(s) - that means the creator didn't want you to have the LSP file(s). And if you dis-assemble the FAS it would be grounds for the creator to sue you. Therefore no-one here would do something like that for you. Firstly because we'd not want such to happen to our own products. Secondly, we don't want to get into trouble with others - especially on someone else's behalf. If you want to go further with this, please refrain from using this forum (or similar) for such. You would be better served in some Cracker (note a Hacker is not a Cracker) community - i.e. go play with the criminals making viruses, breaking security systems & cracking software licensing!
    1 point
  21. Around the world there is a thing called copyrite and a even bigger subject "software piracy". Having been involved in a commercial product thats why a FAS is used to stop illegal copying. You have your answer above contact the author !
    1 point
  22. What is the purpose behind your request? Have you contacted the person whose code you are interested in? I imagine that some programmers compile their code to protect it from being used in a manner they would find objectionable.
    1 point
  23. The FAS format is the compiled version of an AutoLISP file, and one can guess that the programmer had a good reason to don’t provide his/her routine in plain code. If you really need to have access to that code, then I believe that is better to contact the programmer then to attempt to de-compile his/her work.
    1 point
  24. Another method: (defun c:vpon ( / d s ) (vl-load-com) (if (setq s (ssget "_+.:S:E:L" '((0 . "VIEWPORT")))) (progn (setq d (vla-get-activedocument (vlax-get-acad-object))) (vla-put-mspace d :vlax-true) (vla-put-activeviewport d (vlax-ename->vla-object (ssname s 0))) ) ) (princ) ) And to 'deactivate': (defun c:vpoff ( ) (vla-put-mspace (vla-get-activedocument (vlax-get-acad-object)) :vlax-false) (princ) )
    1 point
×
×
  • Create New...