![]() If we only have one, return an array of a single value If we don't have any block names, return null Private static TypedValue CreateFilterListForBlocks( PromptSelectionResult psr = ed.SelectAll(sf) New SelectionFilter (CreateFilterListForBlocks(blkNames)) entities with the specified properties are Build a conditional filter list so that only ( BlockTableRecord )tr.GetObject(bid, OpenMode. ![]() Var anonBlks = btr.GetAnonymousBlockIds() Get the anonymous blocks and add them to our list ![]() "\nCannot find block called \"\".", blkName Start by getting the handle of our block, if it exists We can then create a conditional SelectionFilter – with an “or” clause listing each of these names – and use that to find any block meeting the condition. Using the very handy ArxDbg sample, it was easy to find out that the modified block definition contains XData linking back to the original – under the AcDbBlockRepBTag app name there’s an entry containing its handle – which we can use to compile a list of the (anonymous) names of modified blocks for which to look. The answer to this riddle was actually reasonably straightforward, in the end. This makes it a little difficult to use a SelectionFilter to look for these BlockReference objects, as their associated BlockTableRecord has a name such as “*U24” rather than the name being searched for. If you LIST the block reference, you can see that it still mentions the originating block by name, so it’s clear some connection still exists between the two block definitions, at the very least. This is straightforward for unmodified dynamic blocks – just as with standard blocks, you can filter on the block name very easily – but it works less well on dynamic blocks whose properties have been modified at an instance level.Įssentially what happens is this: if you select a block reference to a dynamic block in the AutoCAD editor and then use (for example) the Properties window to edit some of the custom properties associated with that block, the block definition gets duplicated as an anonymous block – with the modified properties, of course – and the reference gets updated to point to that. He’s interested in applying a selection filter when the user selects dynamic blocks. To increase the width, input a larger number, I set mine at 64.An interesting question came in via email from Rob Outman. This is the value that controls the dialog box width assigned for the layer name. Open the file in Notepad, or text editor, and scroll down till you see Column section, and look below that for, key = "slayer" width = 31. (if you are worried, feel free to make a backup of xlist.dcl before editing)įirst thing is to locate the XLIST.DCL file, it will be in an EXPRESS folder, most likely in a path like so:Ĭ:\Program Files\Autodesk\Autodesk AutoCAD 2015\Express\xlist.dcl This may sound daunting, but I assure you, it's easy, and safe. The solution is to edit the XLIST.DCL file (which stores the dialog box settings), and increase the column width. In the image to the left, we see a LINE object selected, but we cannot see the full layer name, since the combined length of the drawing and layer name exceeds 31 characters, which is the default XLIST dialog box width. Can we modify the dialog box to see the full layer name? One issue with XLIST is sometimes the layer name is truncated and not displayed fully in the dialog box. ![]() ![]() I'm a huge fan of XREFS, and probably my two favourite XREF-related commands are NCOPY and XLIST: NCOPY makes a copy of any entity in an XREF and places it in the host drawing, and XLIST returns the properties of an object in an XREF. ![]()
0 Comments
Leave a Reply. |