Short description
๐ DynamicBlockFilter is an AutoCAD and Civil 3D compatible AutoLISP utility for selecting dynamic block references by their dynamic property values. It helps CAD users quickly isolate matching dynamic blocks in a DWG, reduce manual selection time, and improve drawing cleanup, block auditing, and AutoCAD production workflows.

Command:
๐งฐ Load the LISP with APPLOAD or by adding DynamicBlockFilter.lsp to the AutoCAD startup suite.
โถ๏ธ Run DynamicBlockFilter at the AutoCAD command line to open the dynamic block property filter workflow.
โจ๏ธ The internal function (DynamicBlockFilter) can also be typed at a Select objects: prompt inside another AutoCAD modification command.
๐ฏ The user selects one source dynamic block, chooses property values in the generated DCL dialog, then the routine returns or highlights all matching block references.
๐งฉ Target platform: AutoCAD and Civil 3D with Visual LISP COM support through vl-load-com and ActiveX dynamic block APIs.
Description:
๐ DynamicBlockFilter scans AutoCAD dynamic block references and builds a filtered selection set based on dynamic block property values. The user starts by selecting a source AcDbBlockReference that is confirmed as a dynamic block through vla-get-IsDynamicBlock.
๐ The routine reads the block effective name with vla-get-EffectiveName and extracts its dynamic properties through getDynamicBlockProperties. It then creates a temporary DCL dialog where the user can choose allowed property values, enter custom values, or leave a field empty to match all values.
๐ง For properties with AllowedValues, the program displays popup lists with an asterisk option for all values. For editable numeric or text properties, it displays edit boxes and optional fuzz tolerance fields, making the tool practical for distance, angle, visibility, lookup, stretch, flip, rotation, and other dynamic block parameters.
๐ The user can search either the entire drawing or a manual selection set. Matching references are selected in AutoCAD using sssetfirst, so the result can immediately be edited, moved, copied, erased, changed by layer, or used inside another command.
๐ง This AutoLISP tool does not create, modify, or rename Civil 3D alignments, surfaces, sections, profiles, labels, or styles. Its purpose is focused on dynamic block filtering, AutoCAD selection automation, DWG cleanup, block auditing, and Civil 3D drawing management support.
Helper function: (if any)โ
- ๐ Command wrapper –
c:DynamicBlockFilterruns the filter and applies the returned selection set withsssetfirst. - ๐ง Reusable selection function –
DynamicBlockFilterreturns a real AutoCAD selection set, so it can be called from another LISP routine or from an active command selection prompt. - ๐ Dynamic block validation – the code checks
vla-get-ObjectNameforAcDbBlockReferenceand checksvla-get-IsDynamicBlockbefore reading dynamic properties. - ๐งฉ Effective name matching –
vla-get-EffectiveNameis used so dynamic anonymous block references can still be matched to the original dynamic block definition. - ๐ DCL property dialog –
DynBlkPropValuewrites a temporary DCL file with popup lists, edit boxes, radio buttons, and OK or Cancel controls. - ๐ท๏ธ Allowed value handling – dynamic properties with
AllowedValuesbecome popup filters and include*as a match-all option. - ๐ Numeric tolerance support – free numeric properties include a Fuzz field and compare values with
equal, reducing false mismatches caused by floating-point precision. - ๐งฎ Unit-aware conversion –
ToString,angtos,rtos,angtof, anddistofhelp compare angle, distance, and text-like dynamic property values. - ๐ Selection scope control – the dialog lets the user filter either All drawing or a user-picked Selection set.
- ๐ System variable restoration – the routine stores
DIMZIN, temporarily changes it for cleaner numeric formatting, and restores it in the error handler.
Functionalities:
- ๐ Select matching dynamic blocks – automatically finds block references with the same effective dynamic block name and matching dynamic property values.
- ๐งฉ Filter by visibility, lookup, distance, angle, flip, stretch, and custom parameters – supports common AutoCAD dynamic block property workflows.
- ๐ DCL-based property selection – shows a compact AutoCAD dialog generated at runtime from the selected block properties.
- โญ Use wildcard all values – empty fields and
*allow broad matching without requiring every property to be specified. - ๐ Use fuzz tolerance for numeric values – improves matching for dynamic block distances, rotations, and calculated values affected by precision.
- ๐ข Filter the whole drawing – searches all block references in the active DWG for matching dynamic block configurations.
- ๐ง Filter only a manual selection – limits the search to selected objects when the user wants controlled local filtering.
- ๐งฐ Works inside other AutoCAD commands – the function can return a selection set during a command selection prompt, improving command chaining.
- ๐ Highlight results in model space – matched block references become the active AutoCAD selection set for immediate editing.
- ๐งน Useful for DWG cleanup and block auditing – quickly isolates specific dynamic block variants without manually inspecting every instance.
Result:
โ The final result is a faster AutoCAD and Civil 3D dynamic block selection workflow. Instead of manually searching for block references with a specific visibility state, lookup value, distance, angle, or other dynamic property, the user selects one source block, defines matching criteria, and receives a ready-to-use AutoCAD selection set. This improves drawing cleanup, production editing, block QA, CAD standardization, and Civil 3D DWG management with fewer manual steps and more reliable filtering.
Images, animations etc.

XAML code:
๏ปฟ<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
<src:RibbonToolTip x:Key="DynamicBlockFilter">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: DynamicBlockFilter</Bold>
<LineBreak/>
<Bold>Version: 1 Date: July 13, 2008, 02:01:26 PM</Bold>
<LineBreak/>
<Bold>Version: 1.1 Date: 21.06.2026 9:06:20PM</Bold>
<LineBreak/>
<Hyperlink>https://www.theswamp.org/index.php?topic=23944.0</Hyperlink>
<LineBreak/>
short_description: |
<Bold><Run Foreground="DodgerBlue">SEO Description</Run></Bold><LineBreak/>
<Run Foreground="White">๐ DynamicBlockFilter is an AutoCAD and Civil 3D AutoLISP utility for filtering dynamic block references by property values.</Run><LineBreak/>
<Run Foreground="White">It helps CAD users isolate matching dynamic blocks, audit DWG content, clean drawings, and reduce manual selection time.</Run><LineBreak/>
<Run Foreground="LimeGreen">The main benefit is faster dynamic block selection and more reliable AutoCAD Civil 3D production drawing management.</Run><LineBreak/>
command: |
<Bold><Run Foreground="DodgerBlue">Main Command and Loading Method</Run></Bold><LineBreak/>
<Run Foreground="White">๐งฐ Load the routine with </Run><Bold><Run Foreground="Orange">APPLOAD</Run></Bold><Run Foreground="White"> or load </Run><Bold><Run Foreground="Orange">DynamicBlockFilter.lsp</Run></Bold><Run Foreground="White"> from the startup suite.</Run><LineBreak/>
<Run Foreground="White">โถ๏ธ Run </Run><Bold><Run Foreground="Orange">DynamicBlockFilter</Run></Bold><Run Foreground="White"> at the command line to start the DCL-based dynamic block filter.</Run><LineBreak/>
<Run Foreground="White">โจ๏ธ The function </Run><Bold><Run Foreground="Orange">(DynamicBlockFilter)</Run></Bold><Run Foreground="White"> can also be used at a Select objects prompt inside another command.</Run><LineBreak/>
<Run Foreground="White">๐ฏ The target platform is AutoCAD and Civil 3D with Visual LISP COM and ActiveX support.</Run><LineBreak/>
description: |
<Bold><Run Foreground="DodgerBlue">Detailed Description</Run></Bold><LineBreak/>
<Run Foreground="White">๐ The program asks the user to select a source dynamic block reference in the drawing.</Run><LineBreak/>
<Run Foreground="White">๐ It verifies that the selected object is an AcDbBlockReference and that it is a dynamic block.</Run><LineBreak/>
<Run Foreground="White">๐ง It reads the effective dynamic block name and extracts the dynamic block properties from the selected reference.</Run><LineBreak/>
<Run Foreground="White">๐ A temporary DCL dialog is generated from the detected properties, so the available filters match the selected block.</Run><LineBreak/>
<Run Foreground="White">๐ท๏ธ Properties with allowed values become popup lists, while free values become edit boxes with optional fuzz tolerance.</Run><LineBreak/>
<Run Foreground="White">๐ The user chooses whether to search all drawing block references or only a selected subset.</Run><LineBreak/>
<Run Foreground="White">๐ข Matching dynamic block references are returned as an AutoCAD selection set and highlighted in the drawing.</Run><LineBreak/>
<Run Foreground="DarkOrange">๐ง The tool does not change Civil 3D alignments, profiles, sections, labels, or styles. It is focused on dynamic block filtering and DWG selection automation.</Run><LineBreak/>
helper_function: |
<Bold><Run Foreground="LimeGreen">Helper Logic</Run></Bold><LineBreak/>
<Run Foreground="White">๐ Command wrapper - </Run><Bold><Run Foreground="Orange">c:DynamicBlockFilter</Run></Bold><Run Foreground="White"> applies the returned selection with </Run><Bold><Run Foreground="Orange">sssetfirst</Run></Bold><Run Foreground="White">.</Run><LineBreak/>
<Run Foreground="White">๐ง Reusable function - </Run><Bold><Run Foreground="Orange">DynamicBlockFilter</Run></Bold><Run Foreground="White"> returns a real AutoCAD selection set that can be used inside other routines.</Run><LineBreak/>
<Run Foreground="White">๐ Dynamic block validation - </Run><Bold><Run Foreground="Orange">vla-get-ObjectName</Run></Bold><Run Foreground="White"> and </Run><Bold><Run Foreground="Orange">vla-get-IsDynamicBlock</Run></Bold><Run Foreground="White"> confirm the selected source object.</Run><LineBreak/>
<Run Foreground="White">๐งฉ Effective name matching - </Run><Bold><Run Foreground="Orange">vla-get-EffectiveName</Run></Bold><Run Foreground="White"> supports dynamic anonymous block references.</Run><LineBreak/>
<Run Foreground="White">๐ DCL dialog builder - </Run><Bold><Run Foreground="Orange">DynBlkPropValue</Run></Bold><Run Foreground="White"> writes and loads a temporary DCL interface.</Run><LineBreak/>
<Run Foreground="White">๐ท๏ธ Allowed values - dynamic property </Run><Bold><Run Foreground="Orange">AllowedValues</Run></Bold><Run Foreground="White"> become popup filters with an asterisk match-all option.</Run><LineBreak/>
<Run Foreground="White">๐ Fuzz tolerance - numeric values are compared with </Run><Bold><Run Foreground="Orange">equal</Run></Bold><Run Foreground="White"> and a user-entered tolerance.</Run><LineBreak/>
<Run Foreground="White">๐งฎ Unit conversion - </Run><Bold><Run Foreground="Orange">ToString</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="Orange">angtos</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="Orange">rtos</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="Orange">angtof</Run></Bold><Run Foreground="White">, and </Run><Bold><Run Foreground="Orange">distof</Run></Bold><Run Foreground="White"> help compare angle and distance values.</Run><LineBreak/>
<Run Foreground="White">๐ System variable restoration - </Run><Bold><Run Foreground="Orange">DIMZIN</Run></Bold><Run Foreground="White"> is restored after execution or error handling.</Run><LineBreak/>
functionalities: |
<Bold><Run Foreground="LimeGreen">Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">๐ Select matching dynamic blocks - finds block references with the same effective name and chosen dynamic property values.</Run><LineBreak/>
<Run Foreground="White">๐งฉ Filter by visibility, lookup, distance, angle, flip, stretch, and custom dynamic block parameters.</Run><LineBreak/>
<Run Foreground="White">๐ DCL-based property selection - creates a compact dialog from the selected block properties.</Run><LineBreak/>
<Run Foreground="White">โญ Match all option - empty values and asterisk values allow broad filtering.</Run><LineBreak/>
<Run Foreground="White">๐ Fuzz tolerance - improves matching for numeric dynamic properties and floating-point values.</Run><LineBreak/>
<Run Foreground="White">๐ข Whole drawing mode - searches all matching block references in the active DWG.</Run><LineBreak/>
<Run Foreground="White">๐ง Selection mode - limits filtering to user-selected objects when required.</Run><LineBreak/>
<Run Foreground="White">๐งฐ Command chaining - the function can be called during another AutoCAD selection prompt.</Run><LineBreak/>
<Run Foreground="White">๐ Highlight result set - matched block references become the active AutoCAD selection.</Run><LineBreak/>
<Run Foreground="White">๐งน Drawing cleanup support - useful for block audits, CAD standards checks, and AutoCAD Civil 3D DWG management.</Run><LineBreak/>
result: |
<Bold><Run Foreground="DodgerBlue">Final Result</Run></Bold><LineBreak/>
<Run Foreground="White">โ
The final result is a fast, property-aware dynamic block selection workflow for AutoCAD and Civil 3D.</Run><LineBreak/>
<Run Foreground="LimeGreen">Users can isolate the exact block variants they need, reduce repetitive manual selection, improve DWG cleanup, and speed up production editing.</Run><LineBreak/>
additional_info: |
<Bold><Run Foreground="DodgerBlue">Additional Information and Limitations</Run></Bold><LineBreak/>
<Run Foreground="DarkRed">๐ด Important limitation - the source object must be a dynamic block reference.</Run><LineBreak/>
<Run Foreground="DarkOrange">๐ง The routine only creates a selection set and does not modify block geometry by itself.</Run><LineBreak/>
<Run Foreground="White">๐ Anonymous dynamic block references are handled through effective name matching.</Run><LineBreak/>
<Run Foreground="White">๐ง Numeric filtering depends on the selected fuzz tolerance.</Run><LineBreak/>
<Run Foreground="White">๐ The temporary DCL file is created, loaded, unloaded, and deleted during the command.</Run><LineBreak/>
</TextBlock>
<Grid>
<Image Source="Image_000.jpg" Stretch="Uniform"/>
</Grid>
</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Leave a Reply
You must be logged in to post a comment.