Jump to content

Bock won't update after processing via lisp


handasa

Recommended Posts

Greetings every one

 

i have a block and i want to scale its subentities by using

 

 

 

 

(setq acdoc  (vla-get-ActiveDocument (vlax-get-acad-object)) 
blocks (vla-get-Blocks acdoc))
(setq itm (car (entsel)))
(setq name (vla-get-Name (vlax-ename->vla-object itm)))
(setq def (vla-item blocks name))
(setq base (vla-get-Origin def))
(vlax-for o def (vla-ScaleEntity o base 0.5))

 

 

the routine process only the selected block ... and the other instances of block won't be updated in the drawing unitl i open block editor "bedit" and do some staff there and save and close it

 

 

any suggestions will be appreciated ..

thanks

Link to comment
Share on other sites

i use this

(vla-Regen acdoc acAllViewports)

also with no hope

 

these are two blocks with the same scale

scadddd.png

 

they only get back to their correct scales after opening block editor and save block

 

scale2.png

Link to comment
Share on other sites

yes it is

i use this now to do the jop

 

If a dynamic block reference has dynamic block parameter values which differ from the block definition, then the dynamic block reference will reference an anonymous block definition which contains geometry matching the expected display for the set of dynamic parameter values.

 

Therefore, if you wish to scale the objects within every dynamic block reference, you will need to scale the objects within the dynamic block definition, and every anonymous block definition pertaining to the dynamic block.

Link to comment
Share on other sites

.... and you may lose the control / benefit of these parameters when scaling the related / connected objects unless that Parameter is other than visibility.

 

I'm guessing cause there are no methods supported for the parameter object:

 

_$ (vlax-dump-object (car (vlax-invoke (vlax-ename->vla-object (car (entsel "\nPick dynamic block: "))) 'GetDynamicBlockProperties)) t)
; IAcadDynamicBlockReferenceProperty: AutoCAD Dynamic Block Property Interface
; Property values:
;   AllowedValues (RO) = nil
;   Description (RO) = ""
;   PropertyName (RO) = "blabla"
;   ReadOnly (RO) = 0
;   show (RO) = -1
;   UnitsType (RO) = 2
;   Value = 60.0
[color="red"]; No methods[/color]

 

Therefore ScaleEntity method is not available.

Link to comment
Share on other sites

I'm guessing cause there are no methods supported for the parameter object:

 

Therefore ScaleEntity method is not available.

 

When objects being scaled bigger for instance then objects may get out of the parameter's selection limits, so this should escape objects from the boundary of any parameter other than Visibility since the last one doesn't require any selection.

 

Hope this clear enough.

Link to comment
Share on other sites

When objects being scaled bigger for instance then objects may get out of the parameter's selection limits, so this should escape objects from the boundary of any parameter other than Visibility since the last one doesn't require any selection.

 

Hope this clear enough.

 

Ahh, now I understood what you mean (by visualising how the parameter shall be created from scratch by hand). :)

Link to comment
Share on other sites

We used to use the

(entupd ename)

in the old good AutoLisp times... :oops:

It was mandatory when modifying complex entities, like old-style POLYLINES and (yes! :-) BLOCKS...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...