Graphically not showing the changing effect of Dim Scale Overall

Graphically not showing the changing effect of Dim Scale Overall

dbhunia
Advisor Advisor
813 Views
2 Replies
Message 1 of 3

Graphically not showing the changing effect of Dim Scale Overall

dbhunia
Advisor
Advisor

Continuing to the post  This 

 

Whenever I am changing the Dim Scale Overall of each Dimensions inside a Block by the method I stated in this post or by using .net its working fine ......

 

But whenever I going through vla ....... Like this....

 

 

(defun C:CDS ( / ) 
(vl-load-com)
(setq dimsc (getreal "\nDimension scale factor inside Block: "))
(if (= (cdr (assoc 0 (setq nfo (entget (car (setq sel (entsel "Select a block: "))))))) "INSERT")
    (vlax-for item (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))(cdr (assoc 2 nfo)))
	(setq Entity (cdr (assoc -1 (setq EntityData (entget (vlax-vla-object->ename item))))))
	(if (= (cdr (assoc 0 EntityData)) "DIMENSION")
		(progn
		    (vla-put-ScaleFactor (vlax-ename->vla-object Entity) dimsc);;Taking Effect in properties but not Showing the effect graphically
		    (vla-put-Color (vlax-ename->vla-object Entity) 3);;Showing effect graphically
		    (vla-update (vlax-ename->vla-object Entity))
		)
	)
    )
    (prompt "\nNo block selected")
)
(vla-update (vlax-get-acad-object)) (vla-regen (vla-get-ActiveDocument (vlax-get-acad-object)) acAllViewports) (princ) )

 

Graphically it is not showing the effect of Dim Scale Overall of each Dimensions inside the Block, but other properties like color has no problem...... while I am checking through "dumpAllProperties" I get that the value has been changed as per input value......

 

Why this type of behavior?.......


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
814 Views
2 Replies
Replies (2)
Message 2 of 3

ronjonp
Mentor
Mentor

Same problem here .. A kludge could be to explode the block  (vlax-invoke yourblock 'explode) and recreate it .. that seems to work here.

 

0 Likes
Message 3 of 3

john.uhden
Mentor
Mentor

I haven't tried it at all, but perhaps if you do a vla-update on the block insertion...

John F. Uhden

0 Likes