Insert and Burst block in the same macro

Insert and Burst block in the same macro

nuno.ramos5SJR2
Contributor Contributor
520 Views
10 Replies
Message 1 of 11

Insert and Burst block in the same macro

nuno.ramos5SJR2
Contributor
Contributor

Hi all

I´m trying to write a simple macro for when I pick the block from the Tool Palette automatically burst it. Here is the macro :

 

^C^C-insert;"C:/Users/NunRam/KSCPT_TOOL_PALETTES_R10/ACAD CUSTOMIZE/BLOCKS/K-VTD-BM-ML-1UL-TOP_R00.dwg";0,0,0;1;;;REGEN;(initcommandversion);_burst;_all;;

 

Apparently seams to work but in the end the block doesn´t get bursted. Can anyone help me to combine the two command without use of LISP? Thanks.

 

Result(F2):

-insert
Enter block name or [?] <K-VTD-BM-ML-1UL-TOP_R00>: "C:/Users/NunRam/KSCPT_TOOL_PALETTES_R10/ACAD CUSTOMIZE/BLOCKS/K-VTD-BM-ML-1UL-TOP_R00.dwg"
Duplicate definition of block GENAXEH ignored.
Duplicate definition of block _DotSmall ignored.

Units: Millimeters Conversion: 1
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate/Explode/REpeat]: 0,0,0

Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>: 1
Enter Y scale factor <use X scale factor>:

Specify rotation angle <0>:

Command: REGEN
Regenerating model.

Command: (initcommandversion)
T

Command: _explode

Select objects: _all
54 found
53 were not in current space.

Select objects:

Command:

0 Likes
Accepted solutions (1)
521 Views
10 Replies
Replies (10)
Message 2 of 11

paullimapa
Mentor
Mentor

Odd that the command prompt shows explode and not burst. Why are you exploding all and not just the last item inserted?  What happens if you replace this:

;_burst;_all;;

With this:

;(c:burst);_L;;


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 11

Kent1Cooper
Consultant
Consultant

BURST is not a native AutoCAD command, but an Express Tool, so I don't think (initcommandversion) is doing anything for you.

 

Can you live with EXPLODE instead?  If so, you can Insert a Block "pre-exploded" so you don't need to do it afterwards, by prefixing the name with an asterisk.  But it will ask for only one scale factor.

 

As an aside, you don't need to include the .dwg filetype ending -- it won't Insert any other kind of file.  And if you put that file path into your Support File Search Path list in the OPTIONS dialog box Files tab, you don't need to spell it out, but can call for just the name.

Kent Cooper, AIA
0 Likes
Message 4 of 11

ВeekeeCZ
Consultant
Consultant

If burst is necessary, then this should work.

 

^C^C-insert;"C:/Users/NunRam/KSCPT_TOOL_PALETTES_R10/ACAD CUSTOMIZE/BLOCKS/K-VTD-BM-ML-1UL-TOP_R00.dwg";s;1;r;0;non;0,0;burst;l;;

0 Likes
Message 5 of 11

nuno.ramos5SJR2
Contributor
Contributor

Hi BeeKeeCZ
Thanks for your help. Yes I want burst and i have Express Tool installed, so no problem here.
Your suggestion produced same result; at the end the block didn't burst. However i found a solution. If at the end of the macro i recall last command (in this case, Burst) i get what i want.

 

^C^C-insert;"C:/Users/NunRam/KSCPT_TOOL_PALETTES_R10/ACAD CUSTOMIZE/BLOCKS/K-VTD-BM-ML-1UL-TOP_R00.dwg";s;1;r;0;non;0,0;burst;l;;;l;;

 

Thanks again and have a great Christmas 🤶 

 

0 Likes
Message 6 of 11

ВeekeeCZ
Consultant
Consultant

I thought that you were inserting just a block that you needed to burst. While, in fact, you're inserting a drawing with your block... so you need to explode a drawing-block, then grab your block, and bust that one.. That's not a proper way to store a block library. It just complicates things.

 

You should export the block from the drawing by using WBLOCK into a single dwg file named by the block. 

Then see the difference in files.

 

eekeeCZ_0-1734609794686.png

 

 

0 Likes
Message 7 of 11

nuno.ramos5SJR2
Contributor
Contributor

 BeeKeeCZ

 

I just wanted to insert the block from a Tool Palette. It is almost done.

Now i wanted to change C:/Users/NunRam to the Windows variable %UserProfile% but the macro doesn´t accepted.

What am i doing wrong?

0 Likes
Message 8 of 11

ec-cad
Collaborator
Collaborator
Accepted solution

^C^C-insert;"C:/Users/NunRam/KSCPT_TOOL_PALETTES_R10/ACAD CUSTOMIZE/BLOCKS/K-VTD-BM-ML-1UL-TOP_R00.dwg";s;1;r;0;non;0,0;burst;l;;;l;;

You could try:
^C^C-insert;(strcat "C:/Users/" (getvar 'LOGINNAME) "/KSCPT_TOOL_PALETTES_R10/ACAD CUSTOMIZE/BLOCKS/K-VTD-BM-ML-1UL-TOP_R00.dwg");s;1;r;0;non;0,0;burst;l;;;l;;

But, that probably won't work unless all users have the /KSCPT_TOOL_PALLETTES...path
and the final drawing name placed there..

Better to Wblock your blocks to a common drive / path that all users are 'mapped to.
Example:
"\\\\G:\\Common Library\\" or such.

ECCAD

0 Likes
Message 9 of 11

Sea-Haven
Mentor
Mentor

My $0.05, put all the must do stuff in the lisp. With defun insertmyblk. This should allow for any problems with running burst last. Can be repeated with different block names.

 

^C^C(if (not insertmyblk)(load "myinsertblk"))(insertmyblk "K-VTD-BM-ML-1UL-TOP_R00")

 

 

0 Likes
Message 10 of 11

nuno.ramos5SJR2
Contributor
Contributor

Hi ECCAD

Thank you for your help. You suggestion works just fine.

Regards.

 nuno.ramos5SJR2

0 Likes
Message 11 of 11

ec-cad
Collaborator
Collaborator

You are welcome!

Did you decide to move your block set to a 'Common drive/path ?

ECCAD

0 Likes