blocks on their own layer

Discussion in 'AutoCAD' started by Pat Bjork, Jul 19, 2003.

  1. Pat Bjork

    Pat Bjork Guest

    I am writing a program to take care of some things from drawings that we are
    getting from another company. These files are comming in with very little
    layer control. I would like to grab all of the blocks of a certain name and
    put them on their own layer. An example would be; take all of the SSCT
    blocks and put them on layer Survey_Section, and then grab all of the SMON
    blocks and put them on layer Survey_Misc. etc. I have the rest of my program
    written to take care of some other things, but I can not figure out how to
    deal with the blocks.

    Thanks in advance,

    Pat
     
    Pat Bjork, Jul 19, 2003
    #1
  2. Pat Bjork

    Jeff Mishler Guest

    (setq bname (getstring "Block name?: "))
    (ssget "x" (list (0 . "INSERT")(cons 2 bname)))

    HTH,
    Jeff
     
    Jeff Mishler, Jul 19, 2003
    #2
  3. Pat Bjork

    Jeff Mishler Guest

    Oops, wrong group! But same logic would apply......
     
    Jeff Mishler, Jul 19, 2003
    #3
  4. Pat Bjork

    johnrhys Guest

    Mark,

    Your code works in VBA great. However, I can not get to work in visual basic.net? Any ideas?
     
    johnrhys, Jul 21, 2003
    #4
  5. Pat Bjork

    Mark Propst Guest

    Sorry, havent' learnt .net yet.
     
    Mark Propst, Jul 21, 2003
    #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.