Block Insert from Ribbon Prompts to Redefine

Block Insert from Ribbon Prompts to Redefine

KMeyer8AYA2
Explorer Explorer
835 Views
12 Replies
Message 1 of 13

Block Insert from Ribbon Prompts to Redefine

KMeyer8AYA2
Explorer
Explorer

When Placing blocks from a custom ribbon menu (Example LED button Below) and then saving and closing. Upon reopening the drawing and trying to insert the same block, it prompts for the block to be redefined. Is there a reason why this is happening? Attached Block reference, as well as a .cuix file with the button (zipped). Problem can be recreated on any new drawing.

 

This is the command that I am utilizing within the macro, works amazingly except for this issue.

 

^C^C^qattreq;0;attdia;0;-insertcontent;C:/BLOCK LIBRARY/LED_PCATS.dwg;;\;;;attdia;1;

 

 

 

KMeyer8AYA2_0-1680026470856.png

We have explored tool palettes previously and decided to go with the ribbon route.

 

Thanks for your help

 

0 Likes
836 Views
12 Replies
Replies (12)
Message 2 of 13

Moshe-A
Mentor
Mentor

@KMeyer8AYA2 ,

 

When inserting a block from outside dwg, AutoCAD takes in consideration that the block may contains some changes and that's why it pauses to ask for a confirmation. if you want to eliminate this set EXPERT to 5 before insertcontent .

be aware that this will always redefine the block.

 

Moshe

 

0 Likes
Message 3 of 13

KMeyer8AYA2
Explorer
Explorer

@Moshe-A I tried the expert variable at 0 as you suggested and researching the variable itself yielded that I should be using 2 to try and suppress that prompt. Attempted the same actions with expert at 2, as well as 5 just to make sure everything possible was suppressed. I still receive the same redefine block prompt. I think expert only works for -block in relation to suppressing that prompt.

0 Likes
Message 4 of 13

Moshe-A
Mentor
Mentor

expert = 5

 

0 Likes
Message 5 of 13

KMeyer8AYA2
Explorer
Explorer
Did not work at expert=5
0 Likes
Message 6 of 13

Moshe-A
Mentor
Mentor

LED_PCATS.DWG is an independent block, why don't you move to insert?

0 Likes
Message 7 of 13

pendean
Community Legend
Community Legend
@KMeyer8AYA2 With several instances of your block in one of my own blank files, and EXPERT variable set to 0, plain AutoCAD never brings that alert box up with the simplified macro:
-insertcontent;C:\Users\MyNameHere\Desktop\LED_PCATS.dwg;;

Perhaps a little bit of testing on your end starting there might reveal something that got missed so far.
Message 8 of 13

KMeyer8AYA2
Explorer
Explorer

@pendean try closing and saving that drawing, then reopening and inserting the block.

0 Likes
Message 9 of 13

pendean
Community Legend
Community Legend
@KMeyer8AYA2 No change in behavior here.
0 Likes
Message 10 of 13

Sea-Haven
Mentor
Mentor

Simple fix don't save file to desktop rather to a directory that is in your support paths even a simple temp directory c:\acadtemp then to insert just use -insert;LED_PCATS.dwg;; 1st time will insert external file, the next time of an insert it will look local inside dwg 1st so will find and not go looking out side.

0 Likes
Message 11 of 13

KMeyer8AYA2
Explorer
Explorer
@Sea-Haven the block library I have is a support path folder location in Autocad,
@Moshe-A Insert seems to want the block to already be loaded on the drawing, while this would solve the apparent problem, would not function correctly when trying to originally insert the block.

I believe this is a limitation of -insertcontent as it always pulls externally, we are exploring other command options. I may try and write a command to check for an instance of the block on the dwg, and use insert, else use -insertcontent from the library.
0 Likes
Message 12 of 13

Sea-Haven
Mentor
Mentor
I just removed the word content in my post skipped over it, for years I have always used "-insert" that will work with just a dwg name. ^c^cINSERT ca3ch-1 DRAG \1;;DRAG
0 Likes
Message 13 of 13

Moshe-A
Mentor
Mentor

@KMeyer8AYA2 

 

Consider moving this to tools palette?

 

 

0 Likes