+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member
    Using
    AutoCAD 2014
    Join Date
    Jul 2015
    Posts
    112

    Smile Bock won't update after processing via lisp

    Registered forum members do not see this ad.

    Greetings every one

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




    Code:
    (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

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,305

    Default

    Is your block dynamic by any chance?
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Senior Member
    Using
    AutoCAD 2014
    Join Date
    Jul 2015
    Posts
    112

    Default

    yes it is
    i use this now to do the jop

    Code:
    (COMMAND "-BEDIT" "" blockname)
    (COMMAND "ZOOM" "A")
    (COMMAND "_BCLOSE" "SAVE")

  4. #4
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,635

    Default

    Just add this to last line of your original code

    Code:
    (vla-Regen acdoc acActiveViewport)
    A man who never made mistakes never made anything

  5. #5
    Senior Member
    Using
    AutoCAD 2014
    Join Date
    Jul 2015
    Posts
    112

    Default

    i use this
    Code:
    (vla-Regen acdoc acAllViewports)
    also with no hope

    these are two blocks with the same scale


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


  6. #6
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,305

    Default

    Quote Originally Posted by handasa View Post
    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.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  7. #7
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,026

    Default

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

  8. #8
    Super Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2015
    Join Date
    Nov 2013
    Posts
    1,023

    Default

    Quote Originally Posted by Tharwat View Post
    .... 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:

    Code:
    _$ (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
    ; No methods
    Therefore ScaleEntity method is not available.

  9. #9
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,026

    Default

    Quote Originally Posted by Grrr View Post
    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.

  10. #10
    Super Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2015
    Join Date
    Nov 2013
    Posts
    1,023

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Tharwat View Post
    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).

Similar Threads

  1. Lisp To update the later
    By nannz in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 7th Apr 2017, 06:08 am
  2. Suppression of Command Line Activity During Lisp Processing
    By abra-CAD-abra in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 21st Jan 2015, 10:25 am
  3. multi processing... vba Lisp...
    By ibach in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 13th Jan 2013, 12:02 pm
  4. Need Lisp to update attributes
    By cabltv1 in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 2nd Feb 2009, 05:50 pm
  5. Hidden bock inserts on hidden layers
    By muck in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 11th Oct 2006, 06:43 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts