scale dynamic blocks change after reopening drawing. After use of vla-InsertBlock command

scale dynamic blocks change after reopening drawing. After use of vla-InsertBlock command

nwbos
Enthusiast Enthusiast
788 Views
6 Replies
Message 1 of 7

scale dynamic blocks change after reopening drawing. After use of vla-InsertBlock command

nwbos
Enthusiast
Enthusiast

I use a script to add multiple blocks to drawing with following code snipped:

 

 

(setq $bScale 1.0)
(setq $theblock (vla-InsertBlock $mspace 
                                 (vlax-3d-point $inspt)
                                 $bname
                                 $bScale
                                 $bScale
                                 $bScale
                                 (- (* $rotang (/ pi 180)))
                 )
)

 

 

 

I've a strange problem. After inserting multiple annotative blocks in drawing on scale 1.0 everything looks great:

acad_Jm6jjUXfjY.png

But than i save the drawing and after reopening the file every block in the drawing is rescaled to 0.2:

after reopening saved drawingafter reopening saved drawing

Someone any idea?

0 Likes
Accepted solutions (1)
789 Views
6 Replies
Replies (6)
Message 2 of 7

ВeekeeCZ
Consultant
Consultant

Just a tip. It could be because blocks are annotative.

0 Likes
Message 3 of 7

nwbos
Enthusiast
Enthusiast

Yes the blocks are annotative, but still find this behaviour strange.

When I insert the same blocks manually with insert command, the block won't change scale after reopening the drawing.

manually inserted block keeps scale at 1.0manually inserted block keeps scale at 1.0

So I think it has something to do with (vla-InsertBlock but i cant explain why

0 Likes
Message 4 of 7

GeeHaa
Collaborator
Collaborator

I guess you could try (command "._insert" $BName "S" $bscale "R" $rotang $inspt)

0 Likes
Message 5 of 7

nwbos
Enthusiast
Enthusiast

Yes but performance of the (command "._insert" ...... is very slow when i want to parse multiple blocks. That's the reason I moved to the (vla-insert realm. But can't explain this behaviour.

0 Likes
Message 6 of 7

nwbos
Enthusiast
Enthusiast
Accepted solution

I've know discovered a weird workarround. before the while loop i set 

(setvar 'Cannoscale "1:1000")
 
At the end is set back to 
(setvar 'Cannoscale "1:200")
 
For me its a short fix that works for kwow, but can someone enlight me what the real problem is?
0 Likes
Message 7 of 7

Sea-Haven
Mentor
Mentor

Was about to say had same problem was doing a annoscale thingafter insert to get around the problem.

 

(setq tobj (ssget "X" (list (cons 0 "INSERT")(cons 2 "DSS-X")(cons 8 "F-SURV-SYMB"))))
(command "_.-objectscale" tobj "" "_a" "1:250" "")

0 Likes