Jump to content

automate commands in LT


samifox

Recommended Posts

Hi

 

using AC 2008 LT.

 

there are many ways to customize your workflow. im new to this. i wonder if i can automate LT. for example, i want to automate the following steps: (initial status : selecting pline)

 

 

  1. offset the selected pline
  2. move the offsetted pline to "specific" layer
  3. exploded the offseted pline
  4. select all lined
  5. extend them all

any input would help

 

Thanks

Link to comment
Share on other sites

You can add a sequence of commands to a toolbar button in the "macro" line or you can write what is called a "script" file, which is basically a long macro, written with a text editor. LT, as far as I know, supports no programming language. Either method is very literal, and will do exactly the same thing each time it's activated. It works as if you were entering commands from the keyboard. You will need to use the versions of commands that don't require dialog boxes, and enter the options you want as part of the macro or script or the routine will stop and wait for you to tell it what to do.

 

There is no error correction or "if/then" type decisions. You have to enter the exact sequence you want to happen. You can find more about scripts and macros in your help file.

Link to comment
Share on other sites

  • 1 month later...

I do not know how to extend all lines automatically, though you could go as far as 5. and then simply window around all the lines in your model.

 

I have not tested this, but you could attempt a macro like this: ^C^C-LAYER;Set;x;OFFSET;Layer;Current;y;\\XPLODE;\_ai_selall EXTEND;\

 

Note: 1. "x" is where you put in the layer that you want the polylines to go into. If these are different every time then you could put a pause "\" and input the name manually.

 

2. "y" is where you put in the distance to offset. Again, if it is constant then write it into the macro code, if it varies then pause for unput using "\".

 

3. The "\" requires you to click once with the mouse to select which side to offset the polyline.

 

4. The next "\" requires you to pick with the mouse the new polyline. I do not know of a way to select new objects using a macro (though I would love to see that function exist!).

 

5. The macro should end with everything selected as cutting edges for the extend command, and you will need to manually window around your model before ending that command.

 

6. Create this macro in the CUI and then place it as a button into you ribbon to use.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...