Group name

Discussion in 'AutoCAD' started by gerbil, Jul 30, 2004.

  1. gerbil

    gerbil Guest

    I am trying to create a group using a variable which is a string. See below.
    Does anybody know if I can only use a literal string? ie in "quotes"

    Dim SomeName as string
    SomeName = Mid$(lb, 13, (lbpos - 13))
    Set GroupObj = ThisDrawing.Groups.Add(SomeName)

    Anybody got any other ideas.

    It's been a bad day!

    Thankyou.

    Matt

    Metrology Dept
    Howmet Ltd
    Exeter
     
    gerbil, Jul 30, 2004
    #1
  2. Have you set a breakpoint on the "Set GroupObj" line to check that the value
    you calculate for SomeName is a valid group name?

    From the help for Add method:

    Group object: You should not specify a Name that is excessively long
    or contains spaces, because these names are not handled well in the
    Group
    dialog box and cannot be entered at the command line.

    HTH,
    James
     
    James Belshan, Aug 2, 2004
    #2
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.