Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

insert block macro

17 REPLIES 17
Reply
Message 1 of 18
ktat35
672 Views, 17 Replies

insert block macro

I need a macro to insert a block and make a layer within that block current.

Thanks, Ktat
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: ktat35

How do you propose to get into the block? At least try it
manually them post here exact steps you did so that someone
can write the macro for you.

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 3 of 18
ktat35
in reply to: ktat35

Dean,
The block I'm inserting brings in all the layers for a new drawing. So I don't need to get "into" the block. I just want to insert a block and make a certain layer current. Does that help?
Message 4 of 18
Anonymous
in reply to: ktat35

If the layer is inside the block, you either need to know
the layer's name in advance or you need to explode the block
to select an entity on that layer. Which is it you wish to
do?

And would this ever change? Or is this a static forever type
macro?

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 5 of 18
Charles_Shade
in reply to: ktat35

Why not save this block as a drawing template? With that layer current?

New, clean, all that you need w/o having to insert anything.

Do the parameters with which the drawing is created change each time? i.e: Limits, Units, Dims, etc...

regards,
cshade
Message 6 of 18
ktat35
in reply to: ktat35

Dean,
I do know the name of the layer, so I do not need to explode the block.
Message 7 of 18
ktat35
in reply to: ktat35

cshade,
I thought about making a new template, but this way would be much easier.
Thanks, KT
Message 8 of 18
Charles_Shade
in reply to: ktat35

"C:\Program Files\AutoCAD LT 2005\aclt.exe" /t "C:\Program Files\AutoCAD LT 2005\Template\Drawing_Template-NEW.dwt"

Place this in the windows desktop shortcut for the target with your template as the file after the /t and when you open LT there will be the template - open - done - ready. Not even an INSERT keystroke, while sipping coffee, reading the news...

You do have to close the drawing if you don't want it and need to start from stratch...

regards,
cshade
Message 9 of 18
Anonymous
in reply to: ktat35

OK, so now you don't want your macro to work like you originally
posted?

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 10 of 18
longleyje
in reply to: ktat35

I'll wade in here... perhaps I have misunderstood.

If, for example, you had a drawing (block) with all your Arch. Layers, a different drawing for your, say electrical layers (if this is the kind of thing you mean???) just insert the desired drawing and the layers comealong with it so-to-speak (the drawing would be essentialy blank save for the layers. Make the layer of choice current.

The macro (diesel) would just duplicate the Command for Insert and appropriate response, plus layer command. One diesel (macro) for each grouping of layers need.

Is this something like what you are after??????


Oldguy
Message 11 of 18
ktat35
in reply to: ktat35

YES
This is exactly what I'm trying to do. Sorry I couldn't convey it more clearly.
Message 12 of 18
longleyje
in reply to: ktat35

OK, not goping to write the macro, but....
Just follow your key strokes as-it-were...
INSERT at the the prompt you can either "insert" at some location (e.g. 0,0) - its unimportant as no "objects will appear OR you could 'escape' (^c ??) - Effectively cancels the block insertion in-the-drawing, the the definition - with the layers, is added too the drawing.

Enough said???
Next added (to your macro) the approriate -layer set command(s)

One macro for each Block insert and layer current command Message was edited by: longleyje
Message 13 of 18
longleyje
in reply to: ktat35

Dean
In the words of an Otis Reading Song:
"you gotta gotta try a little tenderness"
:)

JimL
Message 14 of 18
Anonymous
in reply to: ktat35

I'm just confused LOL, I get the impression our OP is new to
AutoCAD and does not understand you can't just magically
pick a layer inside a block without tampering with the
block.

Now let's see if your reply for a basic INSERT macro is it
:)

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 15 of 18
ktat35
in reply to: ktat35

Dean. I'm hardy new at AutoCAD, unless the past sixteen years have just been a learning curve. When you insert a block the layers within that block come with it right! All I need to do is set a specific layer current that the block brings into the current drawing. NO need whatsoever to manipulate the block or "get inside it". I appreciate you trying to answer my question, but you obviously have no idea what I'm talking about. Go "help" someone else.
Message 16 of 18
Anonymous
in reply to: ktat35

Let's recap from your posts here:

"I need a macro to insert a block and make a layer within
that block current."

" I just want to insert a block and make a certain layer
current"

"I do know the name of the layer, so I do not need to
explode the block"

"All I need to do is set a specific layer current that the
block brings into the current drawing NO need whatsoever to
manipulate the block or "get inside it"

What exactly am I missing? How do you make a layer in a
block active if you don't know the name of the layer and you
don't think exploding the block to get in it to pick the
layer from an entity is needed?

And how on Earth is longleyje's response for a macro
anywhere near doing when you don't know the layer's name and
do not want to click on anything?

I have no idea what you've been doing for 16years, but
communication must not have been a priority... . It seems
you just wanted an INSERT and cancel macro and nothing more:
in 16years you would have thought you learnt to do something
that basic already by just looking it up in HELP (or simply
used ADCENTER or Toolpalettes).

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 17 of 18
Charles_Shade
in reply to: ktat35

^C^C-la;_make;(whatever this current layer needs to be); -insert (some path name where your block is)

Sorry Dean, probably should have let her stew but trying to repay the favors I've been granted here.

regards,
Charles Shade
Message 18 of 18
Anonymous
in reply to: ktat35

That's great, at least someone is getting through to the OP.
I guess the requirements have changed since the first posts,
or maybe the OP finally figured it out.

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost