Extracting group codes from multiple dimensions in VBA

Discussion in 'AutoCAD' started by Nathan Guill, Aug 25, 2003.

  1. Nathan Guill

    Nathan Guill Guest

    I amd trying to cycle through a selection set of dimensions to get the group
    codes 13 and 14 in each dimension. I know how I would do this in LISP, but
    I'm trying to keep my code in VBA. Does anyone know how to do this?
     
    Nathan Guill, Aug 25, 2003
    #1
  2. Nathan Guill

    Nathan Guill Guest

    I believe you are refering to acaddimaligned objects.  I am working with acaddimrotated objects.  I tried to use the properties you suggested with all three (acaddimaligned, acaddimrotated, and acaddimension) objects.  Each time I got an error.  On the aligned object, I get a type mismatch, and on the other two, I get a message saying that the property is not supported.



    "wivory" <> wrote in message news:...

    I know nothing about LISP and precious little about Group Codes, but I think what you want are the ExtLine1Point and ExtLine2Point properties of the dimension objects.
      
    Regards
      
    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    Nathan Guill, Aug 26, 2003
    #2
  3. Nathan Guill

    Mark Propst Guest

    Hi Nathan,
    I look forward to whoever is going to clear this up for you.
    I looked at the object model and wondered in amazement that sure enough they
    didn't bother to include what is arguably among the most obvious properties
    someone might need to query - starpoint and endpoint
    <begin opinionated rant>
    Dimensions seem to be one of the many areas where the object model leaves a
    bit to be desired. For one, a dimension style object has almost none of the
    properties of the dimension style - for crying out loud! - you have to
    create a dimension, set it to the style and then query the dimension object
    to get the properties that belong to the style object(or rather *should*
    belong to the style object) - unless I'm mistaken again!
    Now I guess they expect you to explode your dimension, find the points
    created and query them to get the start and endpoints of your dimension.
    You can't even get the .Name of the dimension block - geeeze - "*Dxx*"
    Then at least you could try to workaround by looking in the block
    table...but that probably wouldn't work either!
    This may be one of those areas where Lisp again puts vba to shame!
    <end opinionated rant>

    Hopefully someone will step in and show me the error in the above and
    provide the 'simple straightforward object-oriented way' to get those points
    from the object which you and I are not seeing!
     
    Mark Propst, Aug 26, 2003
    #3
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.