Create a block using script with uniform scale

Create a block using script with uniform scale

cadcammike
Participant Participant
761 Views
2 Replies
Message 1 of 3

Create a block using script with uniform scale

cadcammike
Participant
Participant

I have created an excel file that generates hundreds of internal blocks in a Autocad 2022 Lt drawing, but when i try to insert them they are not uniformly scaled. Is there a way to create a uniform scale block in a script. Or even a way to change the block property to uniform scale from the command line?

0 Likes
Accepted solutions (1)
762 Views
2 Replies
Replies (2)
Message 2 of 3

steven-g
Mentor
Mentor

Creating uniformed scale blocks does look to only be an option in the block dialogue or block editor (so not available from the command line). This post looks to have a solution by making an edit in the registry but playing in the registry is only for the brave.

But what is causing your script to create non-uniform blocks in the first place? Your script should have total control of what it is creating. Can you post a copy of the script and a dwg showing clearly what the problem is.

0 Likes
Message 3 of 3

cadcammike
Participant
Participant
Accepted solution

Thanks for the reply. I did see the regedit option but didn't think that it would control the script.  I have 5000 blocks that i created with the dialogue box. But made another one thousand with a script. These were non uniform. The solution that worked for inserting all 6000 blocks with a script was to insert the block name then specify the scale then the insertion. I rewrote the vba in excel to pull the value for the scale before the insertion point. The output is shown below

Old script where scale is 1 and insertion is origin

-insert;ABC.dwg;0,0;1;;;

New script

-insert;ABC.dwg;scale;1;0,0;;

Consider this resolved.

Credit to MVG1 post 05-13-2020 in reply to CADffm.