Acad2005 VBA bug or misunderstanding? Truecolor filter.

Discussion in 'AutoCAD' started by cadmaxza, Jul 6, 2004.

  1. cadmaxza

    cadmaxza Guest

    Greetings Gang,

    Drawing consists of some circles, colour set to R46 G209 B174. The DXF code equivalent byte value is 3068334.

    If you use the Select command and enter lisp:
    (ssget "x" (list (cons 420 3068334)))
    the circles are selected.

    In VBA I tried:

    Dim FilterType1(0) As Integer
    Dim FilterData1(0) As Variant
    FilterType1(0) = 420: FilterData1(0) = 3068334
    Sel1.Clear
    Sel1.Select acSelectionSetAll, , FilterType1, FilterData1

    where Sel1 is an AcadSelectionSet.

    The VBA code does not select the objects. What have I missed?

    Thanks,

    Kevin.
     
    cadmaxza, Jul 6, 2004
    #1
  2. My guess is that its a bug.

    The folks at Autodesk didn't do a good job in the code that
    translates ActiveX DXF data arrays to their internal counterparts,
    and as a result, when new dxf fields are added, they're not
    automatically supported.

    The same problem exists for Layouts and Lineweights in
    AutoCAD 2002 (not sure about more recent versions).



    AutoCAD based Security Planning Solutions:
    http://www.caddzone.com/securityplanning


    code equivalent byte value is 3068334.
     
    Tony Tanzillo, Jul 6, 2004
    #2
  3. cadmaxza

    Jeff Mishler Guest

    Maybe this is just a typo placing your code here, but this is all I see that
    may affect it....:

    Sel1.Select acSelectionSetAll, , , FilterType1, FilterData1 'note an
    additional comma....

    HTH,
    Jeff

    code equivalent byte value is 3068334.
     
    Jeff Mishler, Jul 6, 2004
    #3
  4. cadmaxza

    cadmaxza Guest

    You're right there was a typo error in the message and code. I corrected the typo but it didnt solve the problem. I think Tony is right. Fortuneately I see that an ACI (code 62) is also included when you assign a true-color - I could use this to get around the problem for now, or just ... oh no ... here we go yet again ... use lisp inside vba.

    Cheers,

    Kevin
     
    cadmaxza, Jul 7, 2004
    #4
  5. cadmaxza

    cadmaxza Guest

    Hey Tony.

    Thx - I think you're right. Besides, I dont think there are many people who have your vast knowledge of Acad - mmm.. ***ponders*** I posted a question on the sheet set manager - cannot figure out how to access to the sheet set name and path in the sheet set "object" - any ideas?

    Cheers,

    Kevin.
     
    cadmaxza, Jul 7, 2004
    #5
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.