Print Page | Close Window

InsertC LISP - Automatic numbering of blocks

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=13638
Printed Date: 16.May.2026 at 12:20


Topic: InsertC LISP - Automatic numbering of blocks
Posted By: eliasabuhani
Subject: InsertC LISP - Automatic numbering of blocks
Date Posted: 13.Sep.2021 at 17:43
Hello guys,

using the insertc command can auto count attributes within a block.
InsCopt command sets the increment, precision and att.number options.
I use the insertc:AttNo Lisp variable to assign a different attribute number (in order), e.g. the 2rd
However, when setting the 2nd attribute number, the 1st one remains with its default value.
I need to define the 1st attribute as a constant value (and not to set the default value to it) - how can it be done?
e.g. a block contains 2 attributes: num1 / num2 - I need to define num1 to E11 and num2 to 1, 2, 3, 4...

Thanks,



-------------
Elias Abu Hani



Replies:
Posted By: Vladimir Michl
Date Posted: 13.Sep.2021 at 22:28
InsertC doesn't work this way - it just touches the "counted" attributes, not the other ones (if any).

You might be able to switch the Att number for a dual-run and use a zero increment to keep the other attribute constant but it won't be convenient. It is probably a too specialized method to add it to the general-use InsertC tool.


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner


Posted By: eliasabuhani
Date Posted: 14.Sep.2021 at 06:18
Hello Vladimir,

when setting the attribute number to 2, it really counts it but it does touch the others by setting them to their default values.
If there is a way where the lisp only touches the wanted attribute and keeping the others on their current values?
or by asking which value to define for the other attribute.

In addition, how can it be possible to switch the attribute for a dual-run?

Thanks,


-------------
Elias Abu Hani



Print Page | Close Window