Jump to content

Leaderboard

  1. mhupp

    mhupp

    Trusted Member


    • Points

      5

    • Posts

      2,166


  2. BIGAL

    BIGAL

    Trusted Member


    • Points

      2

    • Posts

      20,027


  3. Steven P

    Steven P

    Trusted Member


    • Points

      2

    • Posts

      2,981


  4. MSasu

    MSasu

    Trusted Member


    • Points

      1

    • Posts

      4,081


Popular Content

Showing content with the highest reputation on 03/17/2026 in Posts

  1. fixed an error with substr to only remove the first char of the string. and added your + option.
    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. I was using /# and /-# but using / and \ works to. if the 45 still going the wrong way you just need to flip the first two wcmatch calls. right now line 17 ((wcmatch inp "\\*") line 26 ((wcmatch inp "/*") fix line 17 ((wcmatch inp "/*") line 26 ((wcmatch inp "\\*") PolyHouse.lsp
    1 point
  4. Was thinking that as well. would have to tinker with it for a bit. ended up adding an [U]ndo and [C]lose option. *can only use undo on last leg.
    1 point
  5. @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
  6. Should get you what your looking for. code below
    1 point
  7. Try this as a first pass, see if I have the idea right: Not quite as described and only draws lines as it is, rather than Polylines, but it being a Sunday and the CAD should be off it will do for a start, or if it inspires anyone tonight. To consider later: Fixing the loop - as it is just escape out of the LISP to end or join last point to start point. Join the lines together as Polylines (See Lee Mac PLJoin?) (defun c:testthis ( / Pta Ptb Pt1 Pt2 MyLine MyDistance MyAngle ed RefLine RefAngle ) (defun LM:roundm ( n m ) ;; Lee Mac ;; Round to nearest m (* m (fix ((if (minusp n) - +) (/ n (float m)) 0.5))) ) (command "line" pause pause "") ; Draw first segment (setq RefLine (entlast)) ; Line entitity name (setq Pta (setq Pt1 (cdr (assoc 10 (entget RefLine)))) ) ; First line start point (setq Ptb (setq Pt2 (cdr (assoc 11 (entget RefLine)))) ) ; first line end point (setq RefAngle (angle Pt1 Pt2) ) ; First line absolute angle (setq endloop "No") ; marker to keep loop going (while ; While loop (and (= endloop "No") ; Marker still 'no' (= (command "line" Pt2 pause "") nil) ; and user draws a line ) ; end and (setq ed (entget (entlast))) ; next segment entity name (setq Pt1 (cdr (assoc 10 ed))) ; next segment start point (also last one end point (Setq Pt1 Pt2) should also work (setq Pt2 (cdr (assoc 11 ed))) ; next segment end point (if (equal Pt2 Pta) ; If next segment end point = first segment start point (progn (princ "Closed Polyline") (setq Endloop "Yes") ; set end loop marker & end loop ) ; end progn (progn ; else (setq MyDistance (distance Pt1 Pt2)) ; Record next segment distance (setq MyAngle (LM:roundm (- (angle Pt1 Pt2) RefAngle) (/ pi 4) )) ; next segment angle relative to first segment, rounded to pi/4 (45 degrees) ; pi/4: 45 degree angles, pi/12 for 15 degrees (setq Pt2 (polar Pt1 (+ MyAngle RefAngle) MyDistance)) ; Calculate new PT from rounded angle (setq ed (subst (cons 11 Pt2) (assoc 11 ed) ed )) ; Modify the segment to perpendicular / 45 degree (entmod ed) ; update next segment ) ; end progn ) ; end if ) ; end loop (princ) ) ; end defun
    1 point
  8. If you ask the originator for the LISP file, that is the best way.
    1 point
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
×
×
  • Create New...