Jump to content

Help pls with "Automatically Label Attributes"


Ahmed Elsaabbagh

Recommended Posts

The program needs to search double entries

 

You may need an extra program after running lee's when you do a ssget it retrieves in database order, so theoretically you should be able to find the older and new entries using a starting number. Find total number 1st and renumber backwards adding to the number the difference.

 

Disclaimer in database order has worked 99% of the time for me. If you add some more middle then some on end then do update it will not work.

Link to comment
Share on other sites

  • 2 years later...
  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • Ahmed Elsaabbagh

    7

  • ReMark

    6

  • BIGAL

    6

  • Tyson904

    4

On 5/17/2017 at 4:00 AM, Ahmed Elsaabbagh said:

I want any explain how to use "Automatically Label Attributes" LiSP, i need steps how to add serial number on pipes

this LISP from LEE MAC.

 

I was wondering if anyone had a fix that might be able to help me.

 

I am having a problem with this lisp command also. 

The command works fine and it addresses/labels my blocks as it should. But I would like to know how I can modify the command to not only address/label the first address/label in my dynamic block but also any other addresses within the block.

 

For example if I have all pull stations or modules that only have one address that works perfectly. But when I get to my dual modules or IO's that have multiple addresses associated with the block it only recognizes the 1st address (1_address) it will not recognize any other addresses in that block. It will skip to the next block and address it, still in sequence as it should be but then I have to go back and address the other blocks manually.

 

I have tried to combine 1_ADDRESS,2_ADDRESS, I can not get it to recognize more than one at a time. Even combined it only recognizes one.

 

can this command recognize multiple addresses within the same block?

 

 

 When I set the first line to address 1: only does the first address 

 


    autolabel:blockname "FA-MODULES" ;; Name of block to be updated (not case-sensitive / may use wildcards)
    autolabel:blocktag  "1_ADDRESS"    ;; Attribute tag to be updated (not case-sensitive / may use wildcards)  
    autolabel:prefix    "LXXM0"         ;; Numbering prefix (use "" for none)
    autolabel:suffix    ""         ;; Numbering suffix (use "" for none)
    autolabel:start     1          ;; Starting number
    autolabel:length    2          ;; Fixed length numbering (set to zero if not required)
    autolabel:startup   t          ;; Enable on drawing startup (t=enable / nil=disable)
    autolabel:objtype   1          ;; Bit-coded integer > 0 (1=attributed blocks; 2=multileader blocks; 3=multiline text)

 

image.png.e465b1950e3633fb0fefb243398953d1.png

 

When set first line to address 2: only does the second address

 

    autolabel:blockname "FA-MODULES" ;; Name of block to be updated (not case-sensitive / may use wildcards)
    autolabel:blocktag  "2_ADDRESS"    ;; Attribute tag to be updated (not case-sensitive / may use wildcards)  
    autolabel:prefix    "LXXM0"         ;; Numbering prefix (use "" for none)
    autolabel:suffix    ""         ;; Numbering suffix (use "" for none)
    autolabel:start     1          ;; Starting number
    autolabel:length    2          ;; Fixed length numbering (set to zero if not required)
    autolabel:startup   t          ;; Enable on drawing startup (t=enable / nil=disable)
    autolabel:objtype   1          ;; Bit-coded integer > 0 (1=attributed blocks; 2=multileader blocks; 3=multiline text)

 

 

image.png.4e77ab078941fb8bab5b9a362f9ef8bc.png

image.png

Link to comment
Share on other sites

As blocks vary in the number of attributes you probably need some form of custom block editor rather than what Lee has provided.

 

The simplest way is to ignore tag names and use attribute order . You could do some form of list ("A" 22 "D" 56) this would imply 4 attributes and change all 4 in order ("A" 22 "" "" "D" 56) the "" would imply skip the next attribute. Using special label like * would imply this is next number. 

 

 

Link to comment
Share on other sites

On 5/17/2017 at 4:00 AM, Ahmed Elsaabbagh said:

I want any explain how to use "Automatically Label Attributes" LiSP, i need steps how to add serial number on pipes

this LISP from LEE MAC.

 

I was wondering if anyone had a fix that might be able to help me.

 

I am having a problem with this lisp command also. 

The command works fine and it addresses/labels my blocks as it should. But I would like to know how I can modify the command to not only address/label the first address/label in my dynamic block but also any other addresses within the block.

 

For example if I have all pull stations or modules that only have one address that works perfectly. But when I get to my dual modules or IO's that have multiple addresses associated with the block it only recognizes the 1st address (1_address) it will not recognize any other addresses in that block. It will skip to the next block and address it, still in sequence as it should be but then I have to go back and address the other blocks manually.

 

I have tried to combine 1_ADDRESS,2_ADDRESS, I can not get it to recognize more than one at a time. Even combined it only recognizes one.

 

can this command recognize multiple addresses within the same block?

 

 

 When I set the first line to address 1: only does the first address 

 


    autolabel:blockname "FA-MODULES" ;; Name of block to be updated (not case-sensitive / may use wildcards)
    autolabel:blocktag  "1_ADDRESS"    ;; Attribute tag to be updated (not case-sensitive / may use wildcards)  
    autolabel:prefix    "LXXM0"         ;; Numbering prefix (use "" for none)
    autolabel:suffix    ""         ;; Numbering suffix (use "" for none)
    autolabel:start     1          ;; Starting number
    autolabel:length    2          ;; Fixed length numbering (set to zero if not required)
    autolabel:startup   t          ;; Enable on drawing startup (t=enable / nil=disable)
    autolabel:objtype   1          ;; Bit-coded integer > 0 (1=attributed blocks; 2=multileader blocks; 3=multiline text)

 

image.png.e465b1950e3633fb0fefb243398953d1.png

 

When set first line to address 2: only does the second address

 

    autolabel:blockname "FA-MODULES" ;; Name of block to be updated (not case-sensitive / may use wildcards)
    autolabel:blocktag  "2_ADDRESS"    ;; Attribute tag to be updated (not case-sensitive / may use wildcards)  
    autolabel:prefix    "LXXM0"         ;; Numbering prefix (use "" for none)
    autolabel:suffix    ""         ;; Numbering suffix (use "" for none)
    autolabel:start     1          ;; Starting number
    autolabel:length    2          ;; Fixed length numbering (set to zero if not required)
    autolabel:startup   t          ;; Enable on drawing startup (t=enable / nil=disable)
    autolabel:objtype   1          ;; Bit-coded integer > 0 (1=attributed blocks; 2=multileader blocks; 3=multiline text)

 

 

image.png.4e77ab078941fb8bab5b9a362f9ef8bc.png

Link to comment
Share on other sites

5 hours ago, Tyson904 said:

I am having a problem with this lisp command also. 

The command works fine...

 

Instead of repeating your own message, never very useful, explain what is the relation between 1_ADDRESS and 2_ADDRESS, and how you expect a generic auto-numbering routine to handle this.
 

Link to comment
Share on other sites

Roy_043 as I stared to another user this was my first tie posting on the forum so I apologize for the repost of the same message.

 

In regards to the comment you left:

 

The device is a dual monitor module used in fire alarm system design. The block has 2 attributes associated with it. This is because this type of device is programmable to handle to addresses from the panel and monitor more than one point.

1_Address would be the first point being monitored like a tamper switch, 2_Address will be lest say a flow switch. This dual module does the same job as 2 regular monitor modules. 

 

This is why there would be attributes (addresses) 1_ADDRESS and 2_ADDRESS. 

 

I want to be able the auto sequence to recognize that the current block has more than one attribute and label it in order before going to the next device (attribute).

As I stated it will recognize the block but only the address I out in font. If I put it as say 2_ADDRESS, 1_ADDRESS then only address 2 will be counted and address 1 will be skipped and vice versa. 

 

I’m wondering if there is a certain symbol or something that I need to put in between the attributes 1_ADDRESS and  2_ADDRESS to make it recognize both before it goes to the next device.

 

 

HEY THANKS AGAIN FOR THE HELP IT IS VERY MUCH APPRECIATED.

 

Regards,

Link to comment
Share on other sites

When you do a VLA-getattributes you can find out how many so could compare your block and ask for the correct number of values to be entered. If not say to many ask to continue.

 

If you do say ("ADD1" "ADD2"_ in say a list then pick blocks it will update the 1st 2 attributes if you wanted say 1 & 3 then ("add1" "" "add2") is this what you want ?

 

Copy this to the command line pick a block with attributes.

(alert (strcat "There is " (rtos (length  (vlax-invoke (vlax-ename->vla-object (car (entsel "\npick block"))) 'getattributes)) 2 0) " Attributes"))

 

Link to comment
Share on other sites

@BIGAL @Roy_043

 

Hey you are the only two that replied to my original message and i want to say thanks for taking the time to even reply to me at all.

 

I have been trying to get the lsp command edited, I have even been trying to create my own command but it just not working for me.

 

Where should I add the ("ADD1""ADD"2) command. Should I put in in the same line of text with the block names. OR should it go in the actual lisp text some where. IDK I'm lost. If one of you know of a program I can buy or class I can take online to better help me understand the commands by all means please let me know. 

 

Otherwise please help.

Link to comment
Share on other sites

@Tyson904

The program is not designed to do what you want. It is not a matter of changing a few lines, you need a customized version.

I suggest you contact the author (Lee Mac) and take things up with him.

 

Of course there are other numbering solutions. This topic mentions a few:

https://www.theswamp.org/index.php?topic=56291.0

Edited by Roy_043
Link to comment
Share on other sites

Like Roy once you go past a single attribute it gets complex, the start is to go through a block list and make a list of current max numbers so when add a block it adds 1 to correct attribute . I can see increase att2 but not att1, same att1 not att2. Then we go next request want 3 atts.

 

Where problems creep in is in deleting a block say in middle numbers and renumber again. 

 

You can make a field of another block att so theoretically can add 1 problem I can think of is block 0 is erased so number + 1 screws up.

 

Autocad Electrical as I understand has this sort of logic built in so that may be what you need to Google electric patch boards lisp ??

 

 

 

 

Edited by BIGAL
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...