Dimension Style entity access.

Discussion in 'AutoCAD' started by Robert Good, Jun 25, 2004.

  1. Robert Good

    Robert Good Guest

    I am writing a routine that will let the user select and export a predefined
    dimension style to use as a seed file for future creation.

    I can access any current dimension style variables. The hard part is
    accessing the sub-dim style variables.

    Lets say I have style "Standard";_ I can make this style current and get all
    the dim variables that define it.

    What I need to do is access the "Standard$2" "Standard$3" etc. if they
    exist.
    I am straying away from using dxf codes and would like to do this with vl
    commands.

    I think I have a beginning understanding of what I need to do.

    1. set the target dimstyle to current
    2. access the sub dim styles via (vlax-get-property dimradial 'fit ) and
    walk thru all the properties of the sub-dimstyle


    As I think about that, maybe I'm making this to difficult..


    help..squeeeek.........


    Robert Good.
     
    Robert Good, Jun 25, 2004
    #1
  2. Robert Good

    Rudy Tovar Guest

    It's been posted, and discussed before, the same exact thing.

    I would suggest doing a search on dimensions style.

    And you'll have to use activex to gather information for future dimstyle
    information because Autodesk will be eliminating some dxf codes, and they
    will only be exposed in vla object values.
    --

    AUTODESK
    Authorized Developer
    http://www.Cadentity.com
    MASi
     
    Rudy Tovar, Jun 25, 2004
    #2
  3. Robert Good

    Robert good Guest

    Thanks i will search further.

    Robert Good.
     
    Robert good, Jun 26, 2004
    #3
  4. Robert Good

    Robert Good Guest

    DimStyle and Dim Child Style Access:

    Here is the beginning of the routine. It gets the dimstyle "FullScale", and from there I go thru the list and get all the settings. The problem is with the dxf codes 340, 341 and 342, the DMBLK variables. Which the reference says they are obsolete and to access them thru their objectid.
    I can access the dimstyle objectid thru:
    (vla-get-objectid (vla-item gDocDimStyles "FullScale"))
    but have no idea how to get the dimblk variable objectid's without actual drawing them and accessing the entities

    Its been mentioned that I should stay clear of dxf codes with dimensions styles and do this with objectdbx functions. After reading many, many threads on this topic, it looks like the only current and dependable way to get these variables is thru accessing the tblobj. (correct me if im wrong)


    ;;beginning of routine---------------------------------

    (setq gAcadObject (vlax-get-acad-object)
    gActiveDoc (vla-get-activedocument gAcadObject)
    gDocDimStyles (vla-get-dimstyles gActiveDoc)
    ) ;_ end setq

    (setq dimlist (entget (tblobjname "dimstyle" "Fullscale")))

    ;;step thru the list and get all non-obsolete dxf data

    )_end defun





    Robert Good.
     
    Robert Good, Jun 27, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.