Results 1 to 2 of 2

Thread: Retrieving the settings of an MLEADERSTYLE

  1. #1
    AUGI Addict bowlingbrad's Avatar
    Join Date
    2003-11
    Location
    Chicago
    Posts
    1,233
    Login to Give a bone
    0

    Default Retrieving the settings of an MLEADERSTYLE

    Fellow Lispers,
    I have a routine that will create MLEADERSTYLES using vlax-put-property commands. What I am missing is a way to retrieve the current values of an MLEADERSTYLE so that I can transfer the values into my creation routine. vlax-get-property mabye? I can do the following to get a dump of a specific object but not of the style itself. Any help?
    Code:
    (setq x (entsel))
    (vlax-dump-object (vlax-Ename->Vla-Object (car x)) T)

  2. #2
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Retrieving the settings of an MLEADERSTYLE

    You're correct, each call to vlax-put-property has a corresponding vlax-get-property. E.g.
    Code:
    ;; Assume Obj is the vla object reference of the MLeaderStyle
    (vlax-put-property Obj 'TextStyleName "STANDARD") ;Sets the txt stylename to STANDARD
    ;; then
    (setq TStyle (vlax-get-property Obj 'TextStyleName)) ;Stores the TxtStyleName into var TStyle
    BTW, you can also use the vla shortcut way:
    Code:
    (vla-put-TextStyleName Obj "STANDARD") ;Sets the txt stylename to STANDARD
    ;; then
    (setq TStyle (vla-get-TextStyleName Obj)) ;Stores the TxtStyleName into var TStyle
    Sometimes it gives better / easier to use results one way or another, depends on what data type the property is & what you want to do with the data.

Similar Threads

  1. Set current MLeaderStyle without using the dialog box
    By framedNlv in forum AutoCAD Annotation
    Replies: 5
    Last Post: 2017-09-19, 08:07 PM
  2. 2011: Retrieving materials
    By Sigvald in forum Revit - API
    Replies: 2
    Last Post: 2012-04-20, 01:21 PM
  3. osnaps not snapping to block in mleaderstyle
    By CAD Brad in forum AutoCAD General
    Replies: 3
    Last Post: 2008-08-21, 03:39 PM
  4. mleaderstyle undefine issue
    By billy342601 in forum AutoLISP
    Replies: 2
    Last Post: 2007-09-25, 09:19 PM
  5. Retrieving a Back Up
    By tbv in forum Revit Architecture - General
    Replies: 5
    Last Post: 2007-02-20, 02:34 PM

Posting Permissions

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