Smart Leader
Plugin AVC_Leader for AutoCAD and BricsCAD
MLeaders looking for an object under the arrow and fill the text for itself.
Normal multileader (MLeader) will be much smarter when you turn on this program. The multileader will be able to search the objects in the drawing under the place where their arrow points. In order to make a smart leader enough to create the normal multileader and to leave the text blank. Or enter a question mark ‘?’. Or you can type a special code word (substitution) instead of a multileader text. And if under the multileader arrow will find something valuable, the multileader text was miraculously replaced by a description of the found object. You can avoid a lot of mistakes and your work will be reduced to a couple of clicks! Automatic filling of the leader text will drastically reduce the time for drawing up assembly drawings and floor plans, electrical and any other schemes.
The leader will be able to find
The blocks with names. If the block has normal name (not A$...), then the leader will show the block name.
Any attribute of the block. You can specify attribute to look for. Or write the attribute name right when you enter the leader and surround it with characters ‘%’. You can use hidden and constant attributes.
Any parameter of dynamic block. Like the attributes, just specify the name of the parameter between the% characters.
Solids. Leader measure solid and write information about it. For example, the dimensions of the part.
Surfaces of solids. The leader can display information about the specified part face: color, material, area and perimeter.
For all other objects, the Smart Leader can show the standard properties (color, layer, material, length), as well as properties added by the plug-in A>V>C> Properties Palette (Name, Kind, Info)
The leader will find model space objects through a viewport and the leader is in paper space.
The leader can look for the most deeply buried objects within blocks and external references. This feature can be disabled in preferences.
Smart Leader features
With the ALD command, you can quickly place multiple leaders, making only 2 clicks on each leader and not using the keyboard.
The Smart leader will change the text if you move the arrow to another object of the drawing or if you move the entire leader using commands to _Move, _Copy, etc.
The Smart Leader can themselves create AutoCAD Fields that link to an object under the arrow. The Fields are updated when the properties of the object are changed.
The program works with different styles of MultiLeader. For each style of setting their own. Do not forget about the _MLEADERSTYLE command.
You can make smart leader with text or with a block at the end (text/block content), if the block has attributes.
To avoid errors, the program can highlight found objects.
The Smart leaders easily turn off if they at some point interfere with work.
Flexible settings allow you to optimize the program for your needs.
All the Smart Leaders can be updated by one click, without suffering the search for changes. And the leaders remember not the object to which they originally pointed, but the search settings. And when you update the leader, it looks for the object under the arrow again (if it's left there), and maybe the leader will find another object and replace itself with the text. This makes it possible to exclude heavy cases when the arrow of the leader shows one detail, and the text describes a completely different one.
The program interacts well with the plugins A>V>C> Properties Palette, Lay and Sawing Table. Once entering the part names in the properties of the solids, you can quickly place them on the leaders of the Assembly drawing and exploded drawings, and Sawing Table. Measurement of the solid follows the same rules as in the Sawing Table, regardless of the rotation of parts in space.
And if you need to place all the leaders from all the parts and blocks of an assembly drawing at once, then there is a more powerful program for you: Place Leaders.
Read about downloading and installing the program here.
To run the plugin, you will have to register account and top up your account balance or receiving bonuses.
Then you can activate one of the licenses:
Annual license - 15 EUR.
Unlimited license - 75 EUR. Free updates for 1 year.
The trial period is 20 days.
Automatic assignment of part numbers in the Assembly drawing. Using names of solids and measurement of solids. Leader placed in paper space. Finding solid highlight in all viewports.
Demonstration toggle search for objects inside blocks. When InBlock option OFF search displays the name of blocks. And when ON search displays the name and dimention of solids.
Demonstration using Smart Leader with Dynamic Block. Parameter "Length" added to leader. It use Octanorm Maxima for demo.
The GIF to demonstrate the quick installation of Smart Leaders. You can see one of the ways to apply the "Many objects" option. The last leader showed the properties of all three polylines, listing them through a comma.
See how you can use the "Face of solid" option in the Smart Leader (ALD) command. The demonstration shows how to use them to refer to coating, painting and edge materials. I pre-created two leader styles, in order to quickly switch the settings of Smart Leaders. Then I uploaded several materials from the AutoCAD library into the drawing and changed their names. I appropriated the materials to the solids of the shelf model. And I appropriated other materials to individual faces of solids. This is easily done, just select the face by clicking CTRL and change the material in the properties panel.
Commands
ALD - Abbreviation for AvcLeaDer. Quickly placing leaders in 2 clicks
-ALD - Minus version of the settings. Works in the command line. When smart leader are enabled, you can quickly place leaders.
LeaderUpdate - Update all smart leader on all sheets.
AvcOptions - A>V>C> Options Palette for setting smart leaders
Usage Instructions
To create a smart leader you need use standard command _MLeader (MLD), specify the insertion point and leave the text empty. This will signal the program that you need to mark the leader as "smart" and start finding objects under the arrow. As the same signal you can enter the text ‘?’ or letter ‘n’ (from ‘name’ word) or any text with one of the substitutions, enclosed in percent symbols ’%’. After that the leader will always be considered "smart" and will be updated on command LeaderUpdate.
Note that the intelligence of leaders is not like yours. The leader may find nothing or find not what you expected. If the leader has not found the object, the text will be replaced with the template. To avoid errors the found object is highlighted.
Please be aware
Use only one of the topmost object. Hidden under it are not taken into account. But you can turn on the search option "Many objects"
In the usual mode, you can (and need to) put the leader in the center of the surfaces of solids, where there are no edges. Even if AutoCAD does not display the surface (the wireframe mode), the program will still find a solid.
If program configured to find inside blocks, but the inner object has no name (or other specified parameter), then the leader will display the block name.
Measurement of the solid follows the same rules as the program Sawing Table: measured dimensions of the smallest box which will fit it solid. You can mark the solid as the sweep (A>V>C> Properties Palette plugin required).
When you change the drawing, the content of the leader itself will not change. Use the LeaderUpdate or AVCUpdate command to update smart leaders.
A multileader can have a few arrows, but for finding objects use only first one. If you are adding arrows to the leader, the object will be searched under the first (oldest) arrow. When you delete the first arrow the program will look for the object under the remaining arrow..
Nothing is impossible to find on the view made by the ViewBase command. The fact is that such views do not reflect your details, but a special hidden block. Therefore, for using Smart Leaders use viewports on layouts, but not ViewBase.
Special leaders of AutoCAD Mechanical add-on do not grow wiser either. I strongly do not recommend using A>V>C> plug-in in conjunction with AutoCAD Mechanical.
The program can display many properties of objects found under the arrow of the leader. To select the properties you need, use substitutions. Standard substitutions are described here. If the program does not find the standard substitution, it will look for a block attribute with that name or dynamic block parameter. All substitutions are written only in small letters. And attributes of blocks should be written in the same register as they are written in the block.
Follow the messages on the console. There may be program messages.
Blocks-Leader
As you know in AutoCAD, you can create 2 types of leaders: with text content or with a block content. The block is usually used to enclose the part number in a circle or in a square. For such leaders, a special block containing attributes is created in the drawing (automatically or manually). Nobody interferes with creating a block with several attributes and attaching it to the leader.
The Smart Leader program works with all types of leaders. If the block contains only 1 attribute, then working with such leader is no different from working with text leaders. You can configure such smart leaders in the ALD command dialog, and you will have the opportunity to configure 3 templates at once for one leader style: a solid template, a block template, and a template for other objects.
For leaders with multi-attribute blocks, you'll have to use the block editor (_BEdit) to insert the templates into the default values of each attribute.
It is recommended to mark the Preset property of all block attributes so that AutoCAD does not open the attribute value input window every time you create a leader. And of course the program will not work with Constant attributes.
The attribute Tag does not matter.
Smart Leader Options
All smart leader settings are tied to the current leader style. Use the _MLeaderStyle command to create new styles of conventional and smart leaders. You can switch the current leader style directly in the settings dialog. To do this, at the top of the dialog, there is a drop-down list with all the styles of the current drawing.
Keep in mind that the settings are stored not in the drawing, but in the Windows registry, so they will be used in all drawings that have a leader style with the same name.
You can customize Smart Leaders from the A>V>C> Options Palette or from the dialog called by the option TUNE of ALD Command when entering the leader arrow point.
Enable Smart leaders - you can turn off the search for objects for some multileader styles.
Search in blocks - Enable search within blocks and external links. The deepest buried object will be found. Those if there is an external link under the viewport, there is a block in it, there is another block in it, there is solid in it, then the leader parameters will be solid.
Blinking hightlight - shows the object found under the leaders. The found object will be highlighted in order to avoid errors. You can turn it off if the blinking light prevents you.
Native search method - Use the old method of searching for objects under the leader built into the AutoCAD. The method does not allow to find many objects at once, it does not allow selecting subobjects. The search depends on the settings of the visual style. However, it works quickly and does not cause fatal AutoCAD errors.This setting is common for all leader styles. Not possible in BricsCAD.
Not Annotations - Ignore annotations under the leader. Will be excluded:
annotation objects (texts, mLeaders, dimensions, tables, views, hatches, centerLine and centerMark)
all objects on the Annotation, Hatching, Axis and Viewport layers
annotative blocks
Face of solid - Output properties of subobjects: surfaces, edges, vertices of solid. Each face of the solid can have its own color, material, area and perimeter. The rest of the properties will be taken as usual from the solid. Use this option for mark materials of coating, edges, etc.
Many objects - Output on one leader a description of all the objects that will be under the arrow, and not only the top one.
Separator - Use the delimiter character between object descriptions. Use \P to move to new line (\P will only work in text MLeaders, but not in single-line block attributes).
Default format for - here you can specify three lines that will be applied to an leader when you leave the text/attribute empty or enter the question mark "?". A template for solid objects, for blocks and for all other objects is separately set up.
For convenience of inserting substitutions from the right of the template field, there are drop-down lists with all substitutions. Place the cursor in the desired position of the template and select the substitution from the list. In the list for blocks there are all attributes of the current drawing. But there are no block parameters, although the program works with parameters too - I just did not find a way to extract them in this list.
Below in the settings dialog you will see the Common Options panel of all A>V>C> commands. Smart leaders are affected by the size formatting and the use fields. Also, measurements of solids are affected by the tolerance settings and the right angle priority. For details, see the Common Options page. Common Options apply to all leader styles at once.
When you click OK the program starts to cyclically request from you pairs of points to create new leaders. You do not need to enter text. And generally it is not required to touch the keyboard. The texts will be filled in programmatically. To stop the operation, press Esc instead of entering a point.
ALD command
The command is used for quick placement of leaders and for customization. But there is no need to call it: you can use the usual _MLeader command as well.
Select the current leader style using standard AutoCAD | BricsCAD tools.
Run the ALD command.
If Smart Leaders have been disabled for this style, the program will suggest enabling them.
Next, the program will cyclically ask you for point pairs to create new leaders.
The first point is the position of the arrow. A search for objects will be performed under it. When you enter the first point, you will see the TUNE option - it opens the settings dialog.
The second point is the position of the leader text.
You do not need to enter text. And you don't need to touch the keyboard at all. The texts will be filled in automatically, according to the template from the settings.
To exit, press Esc instead of entering a point.
-ALD command
Configures smart leaders from the AutoCAD command line, without opening a dialog. Only the current leader style is configured. To switch the MLeader style, use the standard AutoCAD tools. Have options:
On/Off - Temporarily disable smart leaders and enable them back. And start quick leaders placement. To stop the operation, press Esc instead of entering a point.
SolidTemplate – String for solid description template. Can contain substitutions and any litters. Return to default use %
BlockTemplate – String for block description template. By default %n% - the block name. Also acceptable substitutions and any attributes and parameter of the block.
OtherTemplate - Template for all other objects.
InBlock – switcher for finding inside blocks and external references. Default No.
Highlight - switcher for highlighting found objects. Default Yes.
NotAnnotation - switcher for ignore annotations. Default Yes.
FaceOfSolid - switcher for showing subobject properties. Default No.
MultiObject - switcher for finding all objects under arrow. Default No.
DimentionFormat - Enter string for control the number of decimal places and insignificant zeros. The setting is common for all multileader styles. See the Common Options page for details.
At the end of the operation, the command will call the usual command to create a multileader _MLeader. The settings are saved in the Windows registry for HKEY_Current_User.
LeaderUpdate command
Refreshes Smart Leaders. Leaders must be selected in advance. If nothing is selected, the program will automatically find all Smart Leaders on all sheets of the drawing. Command looking objects under leaders arrows and refills the text in accordance with the template stored in the multileader Info property. The remaining settings are used at the time the command is executed. If the leader arrow has nothing or if specified parameters not found, the command will display at the end the number of failed leaders. The text of the failed leaders will set like the template (usually the question mark ‘?’).
Native search method
There is a built-in search function for drawing objects below the point that the user clicked in AutoCAD. Emulating clicks is very strange. But in some cases you can try to use this native mode.
Native search has a number of features:
Does not work in BricsCAD
Always ignores annotations, but not annotative blocks.
Finds only 1 topmost object and can not find all objects below the point.
It is impossible to select surfaces of solids.
In the 2D Wareframe mode (visual style) it is obligatory to indicate part contour lines. In the center of the circle will fail. Use EndPoint snap. But it mode you can make a leader from internal (unseen) parts.
In the shadow modes (any except 2D Wareframe) you can find solid, poking it in the midst of the faces. But it is impossible to find the invisible objects and will not work for any 2D objects.
Emulating a click requires switching the sheet and displaying all the objects on the screen, so updating all leaders will switch all the sheets and will overwhelm the current view.
Switch to the native search globally for all leader styles. You can not set one style to normal search, and another to native.
Use the native search only if the main method causes problems.
Known Issues
If you copy smart leader by _Copy command then automatically update only the first copy. Other copies can be updated by the command LeaderUpdate
I recommend disabling the AutoCAD option "Make new dimensions associative" (system variable DIMASSOC should put 1 instead of 2) because when it is enabled, leaders behave unpredictably. It has nothing to do with the work of A>V>C> plugin.
When you display the sizes of objects inside the blocks, the block scale is NOT taken into account. Those if you call _Scale for a block, or change the ScaleX property of the block, all the dimensions of the parts inside the block will remain old! Unit Factor is also not taken into account.
There are features and limitations on the use of fields in leaders. Details can be found on the Substitution page.
Notes and symbols AutoCAD Mechanical't know how to disable their visibility and therefore tightly close the objects. (The problem occurs when using the native search method).
One user encountered damage to DWG files by using Smart Leaders in Mechanical 2017. I strongly do not recommend using A>V>C> plug-in with the AutoCAD Mechanical add-in.