Code Red > .NET

Regular Expressions

(1/3) > >>

HD:
Hello,

Does anyone know of a regular expression or wildcard technique that could be used in the snippet below? Where, X is: A, B, C, D, E, or E1


--- Code: ---BlockTableRecord btr =
     tr.GetObject(bt["BORDER-X"],
     OpenMode.ForRead, false) as BlockTableRecord;

--- End code ---

sinc:
I don't think you can do that.

I think you need to walk the entire Block table, and compare the name of each block in the table to your regex, keeping a collection of the blocks that match.

Glenn R:
Yep - what sinc said because of AutoCAD's transactional nature (open/close).

It's Alive!:
What about a selection set? Or maybe you should ignore me  :oops:

sinc:

--- Quote from: Daniel on December 21, 2007, 10:25:41 AM ---What about a selection set? Or maybe you should ignore me  :oops:

--- End quote ---

I don't think there's any way of using a selection set to search a block table.

If you want to use something like Editor.SelectAll(), then a selection filter would work for that.

Navigation

[0] Message Index

[#] Next page

Go to full version