Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/02/2022 in all areas

  1. helps if you give all the information to start with..... By default the 'last command' in AutoCAD when you open a drawing is Help - try it, open something and press enter - help opens. Do another command and enter will repeat the 'last command', I guess they needed to put something there. Is that snippet all that is in your file? might be something else in there affecting things
    2 points
  2. Would that be a problem though to modify the accaddoc.lsp ? If you can't modify files on the C drive, I am guessing that you have some storage... somewhere.... where you can save files outside of any projects you are working on, you can save a LISP file there and go through the AutoCAD start-up suit in appload to load this file whenever you open a new file. That's the trickiest part! All you need is the file to contain your LISP, and at the end of the file just put the line (c:MyLISP) - and that will run MyLISP when that file has loaded into memory.
    2 points
  3. thanks for the help it was exactly that Enter (carriage return).
    1 point
  4. Yes, that's entirely possible. Open a drawing, hit F2, and look at what commands have been run before you do anything else. That should clue you in.
    1 point
  5. Never used it but it seems like you added an Enter (carriage return) that's activating help. Edit startup suite and if there's a blank line use Backspace to remove it.
    1 point
  6. I love both the way you automatically summon him as the keeper of this answer AND the fact that he beat you to it. He's like the CAD genie.
    1 point
  7. To get your point ins_pt3 try this ((lambda ( / js sail_route pl_route ins_pt1 param1 deriv1 alpha ins_pt3) (princ "\nSelect sail_route") (while (not (setq js (ssget "_+.:E:S" '((0 . "LWPOLYLINE")))))) (setq sail_route (ssname js 0)) (princ "\nSelect pl_route") (while (not (setq js (ssget "_+.:E:S" '((0 . "LWPOLYLINE")))))) (setq pl_route (ssname js 0)) (initget 1) (setq ins_pt1 (getpoint "\nGive point on pl_route") param1 (vlax-curve-getParamAtPoint pl_route ins_pt1) deriv1 (vlax-curve-getFirstDeriv pl_route param1) alpha (+ (atan (cadr deriv1) (car deriv1)) (* 0.5 pi)) ins_pt3 (vlax-invoke (vlax-ename->vla-object sail_route) "intersectwith" (vlax-ename->vla-object (entmakex (list '(0 . "LINE") (cons 10 ins_pt1) (cons 11 (polar ins_pt1 alpha 10.0))))) acExtendOtherEntity ) ) (entdel (entlast)) ins_pt3 ))
    1 point
  8. I think I am missing something here (c:runmyprogram) will do just the same as if you typed "runmyprogram" on command line. (setq Cmd (car (LM:listbox "Select an Item" '("IFCALL" "FWRALL" "REVB" "REV1" "IFRDEF") 1))) Would not a cond be useful and run correct choice. (cond ((= cmd "IFCALL")(C:IFCALL)) ((= cmd "FWRALL" )(C:FWRALL )) Just a side note look at Multi radio Buttons.lsp useful for this type of choice. Its here in downloads. (if (not AH:Butts)(load "Multi radio buttons.lsp")) ; loads the program if not loaded already (if (= ahdef nil)(setq ahdef 1)) ; this is needed to set default button ; you can reset default button to user pick save ahdef (setq ans (ah:butts ahdef "V" '("Please choose " "IFCALL" "FWRALL" "REVB" "REV1" "IFRDEF"))) ; ans holds the button picked value as a string
    1 point
  9. If your copying this block often why not wblock it out and save in a support path can then insert when ever required. Like Lee Tool palettes or for me a custom menu with blocks displayed.
    1 point
  10. Thanks mhupp just typed off the top of my head. Hmmmm (setq layname "0") (setq ss (ssget "x" '((0 . "POINT")(cons 8 layname)))) <Selection set: 00000000639E11A0> (sslength ss) 7
    1 point
  11. Just me to avoid errors when using ' to make lists I prefer to use cons for all (foreach p (list u1 u2 u3 u4) (entmake (list (cons 0 "POINT") (cons 10 p)))) Lee-mac has a good explanation about using quote ' v's cons, found it http://www.lee-mac.com/quote.html Another example (setq ss (ssget "x" '((0 . "POINT")(cons 8 layname)))) the layname is a variable so has to be evaluated for layer name a (8 . layname) will error.
    1 point
  12. Have you considered simply using Tool Palettes?
    1 point
×
×
  • Create New...