Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Add costum symbol to all points by layer with insertion point

jocke.o92
Enthusiast

Add costum symbol to all points by layer with insertion point

jocke.o92
Enthusiast
Enthusiast

So my question is, if there is a way to apply a symbol by layer where the insertion point of the symbol is

determine and then applied to all points with by layer.
 
For example, I got a square symbol. I would like to apply this symbol to all my points with layerSign"

and I want the square (Symbol) left corner to attach to the point and not the center of the square.

 

How I do it now is by copying symbol to point one by one. Is there an easier way?

0 Me gusta
Responder
Soluciones aceptadas (1)
1.895 Vistas
12 Respuestas
Respuestas (12)

Patchy
Mentor
Mentor

If the symbol is a block, there are many routines to attach the block at points.

0 Me gusta

jocke.o92
Enthusiast
Enthusiast

It could be a block, as long as I can specify the attachment point of the symbol and then just apply it to all with same layer value

0 Me gusta

Patchy
Mentor
Mentor
0 Me gusta

jocke.o92
Enthusiast
Enthusiast

I cant get it to work. Do you mby have a video when using it?

Thanks for the replay, anyway

0 Me gusta

Patchy
Mentor
Mentor

Show where it gave you trouble, attach an example of some blocks and layers you want them to attach.

( I need 2007 version of .dwg)

0 Me gusta

Kent1Cooper
Consultant
Consultant

@jocke.o92 wrote:

I cant get it to work. ....


Also, tell us which "it" you can't get to work -- there are several routines at that link.

Kent Cooper, AIA
0 Me gusta

jocke.o92
Enthusiast
Enthusiast

I am can barely read code, I will start to learn soon but for now you could say I know nothing. 

I just read the instructions in the code "Place a block object in the location of selected point objects". 

Mby I am doing wrong or something. So I create som points in one layer, add one costum symbol to the drawing and center it over a point and make a block out if it name it exmple "1". 

Now I run the command and it says "block name" where I put in 1, and then select objects, and after that nothing happens.

So hard for me to understand that Autocad doesn't have a simple creat own point style or something like that. Sounds like this expensive software would have something that made it easy to creat symbols to apply for a lot of objects :cara_asombrada:

0 Me gusta

jocke.o92
Enthusiast
Enthusiast

What I am looking for (because there doesn't seem to be an option to creat costum point/symbol and just ad them to layers) would be if it is possible to do it like this or soemthing similar


1. Insert block of symbol and give it a name before running the code
2.(Run code) Quick selection and then typ in your layername and select all objects (point) in the layer, so no need to click on obejcts to select
3. Move or place the block/symbol on one point to center it, and then coppy this block/symbol to all selected points (or something similar). 

0 Me gusta

Kent1Cooper
Consultant
Consultant

@jocke.o92 wrote:

.... it says "block name" where I put in 1, and then select objects, and after that nothing happens.
....


Nothing at all?  Are there any messages?  If you're talking about the nt2blk command, except for your Layer element [which is easily added] it looks like it's built to do what you describe, but it has indications for not having selected any Points, and for calling for a Block that doesn't exist.  Do you not get either of those, nor any error message?

Kent Cooper, AIA
0 Me gusta

jocke.o92
Enthusiast
Enthusiast

https://drive.google.com/file/d/1MhbExtF5q0228MzyHDKt_mXrY4KJmLOw/view?usp=sharing

I uploaded a short clip. No messages at all, what I can see

0 Me gusta

Kent1Cooper
Consultant
Consultant
Solución aceptada

@jocke.o92 wrote:

I uploaded a short clip. No messages at all, what I can see


Then you didn't look very closely at your own video clip.  There is a message:

Kent1Cooper_0-1621881732824.png

It looks like you just hit Enter when it asked for the Block name.

 

Also, you left the default 0,0,0 as the insertion point in your Block definition, instead of specifying the middle of the tree pieces.  So even if it did work, you wouldn't see the trees around the Points, but off in the distance.

 

EDIT:
Looking again, it appears to be at the point where the routine is supposed to feed in the Block name, for insertion at a Point location, that it's getting something it doesn't recognize as a Block in the drawing.  That's puzzling, but I have a shot in the dark suggestion:

 

Might you have a differently-defined INSERT command?  If you change this line:

 

(command "_insert" bname pt "" "" "")

 

to this, with the period prefix to force it to use the native AutoCAD version of the command:

 

(command "_.insert" bname pt "" "" "")

 

does it work?

 

Further EDIT:

That message is coming from the routine, not from AutoCAD.  It's not finding that Block name.  I don't see why not....

Kent Cooper, AIA
0 Me gusta

jocke.o92
Enthusiast
Enthusiast

Hello my friend. Sorry for my late awnser. Been a way so could not replay. This solved the problem, the modification of the code. Excellent!

0 Me gusta