Customizing AutoCAD: Creating Custom Command Macros

Sdílet
Vložit
  • čas přidán 27. 08. 2024

Komentáře • 7

  • @RazzTheKing
    @RazzTheKing Před rokem +2

    Is there a way to access those new commands from the command bar, instead of having them on a palette?

  • @miguelisturiz8936
    @miguelisturiz8936 Před 8 měsíci

    I have the same question about running the new Custom Command (macros) form the command line so I can give it an aliases and run them by typing it (no more clicking). Haven't found any direct answer to that question yet.

  • @brianslater289
    @brianslater289 Před rokem +1

    At my job I always need to change 2 layers in imported Inventor blocks:
    "Visible (ANSI)" needs to become Layer "0"
    and "Hidden (ANSI)" needs to become Layer "0" BUT needs its Linetype to become "HIDDEN2"
    So I want to make a custom button so that when I explode these blocks I can click it, and it will set everything on the "Visible (ANSI)" layer to the "0" layer, and then take everything on the "Hidden (ANSI)" layer and change them to the "0" layer with the Linetype set to "HIDDEN2".
    I know its really specific, but I cannot tell you how many hours or accumulated days I've spent doing that manually. So if you could help in any way that would be amazing. THANK YOU!

    • @betweencadclasses
      @betweencadclasses  Před rokem +1

      Hey Brian! Unfortunately I don't think this can be done with Macros or scripts. It would require the use of the QSELECT dialog box, and there is not a command line version of Quick Select so it cannot be put into a macro. I think it can be done with Autolisp programming, but unfortunately that is beyond the scope of my current abilities.

    • @brianslater289
      @brianslater289 Před rokem

      ​@@betweencadclasses ok, well thankyou for your help with this series regardless. Its straight forward and easy to follow.
      If I may ask 1 (probably more than 1 lol) question, I'm struggling with a custom MIRROR command.
      what I'm trying to do is make a MIRROR command that automatically activates the M2P (midpoint between 2 points) command. So my current scrip is as follows:
      ^C^C_mirror;m2p;\
      If i have an object already selected, this command works perfectly. However unlike the regular MIRROR command that allows you to select an object and then runs the command, my new version flakes out.
      When clicking my new command (ill refer to it as m2p for short), my curser become a square as to select an object, but the command line says "MIRROR First point of mid:"
      After clicking an object (rather than a point) it prompts me to select a "...Second point of mid:" in the same way as above (only allowing me to select an object, and not an actual point). (also 99% of the time it will make me highlight the "next point")
      (the command line at this point says: "First point of mid: Second point of mid: Specify opposite corner:")
      Lastly, I am then able to select and object, press enter, and the MIRROR command runs like the standard MIRROR does, asking me to "Specify first point of mirror line:" and so on.
      So, with ALL that (sorry for such a lengthy comment) I think the command, after clicking it, needs to be something like:
      is an object selected? if yes, then activate mirror followed by m2p. If no, prompt user to select object(s), wait for user prompt, then activate mirror followed by m2p.
      ...but I'm not sure how to write that out....

    • @betweencadclasses
      @betweencadclasses  Před rokem +1

      @@brianslater289 I played around with it. Using ^C^C_mirror;\\;m2p;\ allows for two user inputs after the mirror command is started, so you can select objects to be mirrored with a window or crossing. Of course, that messes up the ability to choose the objects first. A lot of great things can be done with Lisp programming, but unfortunately that is beyond my abilities. I wonder if Lisp could do something better. I would probably make two commands, one with your macro for selecting objects first, and one with my suggestion for starting the command first.

  • @AdemLecaj
    @AdemLecaj Před rokem

    Hi there. Will you help me to write a macro that sets the dimension, ordinates, leaders and text in the curtain layer in the same scale? thank you