Join command in Advance Steel

Join command in Advance Steel

Hollygibbs96
Observer Observer
127 Views
4 Replies
Message 1 of 5

Join command in Advance Steel

Hollygibbs96
Observer
Observer

Hi All. I'm after some help with this pleasae.

I want to insert 4 blocks into my drawing to form a square shape. The original 4 entities  that I made are polylines and are saved as blocks in one drawing called BLOCKS_1.

I start a new drawing and insert  BLOCKS_1 into my drawing. This then makes the 4 polyline blocks available in my current drawing.

I am then inserting the 4 blocks each at their relative 0,0,0 point which arranges the blocks how I want them.

Heres where I cant get the join command to work. (I can manually join the 4 entities together using the JOIN command)

After inserting the 4 blocks I am exploding them so they are now polylines and their end points are touching to form a square.

this is an example of the code to only insert and explode 1 of the entities. I repeat this insert 3 more times, and change the ENTLAST to Ent2 Ent3 Ent4

 

(command "-insert" "Infil_HL" (0.0 0.0 0.0) "" "" "") ;Infil_HL is the block name one of the 4 entities thast are present in the drawing
(setq Ent1 (entlast))
(command "_explode" Ent1)
now when I run the join command it won't join the 4 entities into one.
 
(command "_join" Ent1 Ent2 Ent3 Ent4)

Regards Tony

0 Likes
128 Views
4 Replies
Replies (4)
Message 2 of 5

komondormrex
Mentor
Mentor

i think there should be pedit command instead. maybe like the following. 

(command "-insert" "*Infil_Hl" "0,0,0" "1" "")   ; inserts and explodes altogether
(setq Ent1 (entlast))         ; considering the only entity in a block is pline
...
;repeat 3 times more
...

(command "_pedit" "_m" ent1 ent2 ent3 ent4 "" "_j" "" "")

 

0 Likes
Message 3 of 5

ВeekeeCZ
Consultant
Consultant

I would use a "previous" selection for JOIN command. 

 

(command "_-insert" "Infil_HL" "_s" 1 "_r" 0 "_non" '(0. 0.))  ;Infil_HL is the block name one of the 4 entities thast are present in the drawing
(command "_explode" "_last")
(initcommandversion)
(command "_.join" "_p" "")

 

0 Likes
Message 4 of 5

Moshe-A
Mentor
Mentor

@Hollygibbs96  hi,

 

There is no problem with calling JOIN from (command) function.

your command is missing a closing enter. make sure your geometric

has no hidden gaps.

 

(command "._join" ent1 ent2 ent3 ent4 "")

 

Moshe

 

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

Have a look at your other post, suggestions there.

 

https://www.cadtutor.net/forum/topic/98697-autocad-join-command/

0 Likes