See the top rated post in this thread. Click here

Results 1 to 10 of 12

Thread: Matchline with sheet number field increase/decrease

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Default Matchline with sheet number field increase/decrease

    Hi,

    I looking to have an attributed block with a field in it that will increase by one number.

    My sheet numbering is XX-1.01 and I'm using the SystemVariable, Ctab in fields, I've tried using the field expression in the formula and then adding +1 at the end but I get ####.

    Thanks,

    Kyle

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,380
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    Can you show your expression? It’s not going to automatically increment. It will just be 1+.
    C:> ED WORKING....

  3. #3
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    Ed,

    Thanks for your help.

    Here are the images.

    Screenshot 2023-08-31 171306.jpg

    Screenshot 2023-08-31 172825.jpg

    Cadd4la

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,086
    Login to Give a bone
    2

    Default Re: Matchline with sheet number field increase/decrease

    The Formula Expression within a field will not work in this situation unless the current layout tab name is a number.

    You should look into a DIESEL Expression in your field instead of the formula.

    This would work for the next sheet
    Code:
    $(substr,$(getvar,ctab),1,1)$(+,$(substr,$(getvar,ctab),$(strlen,$(getvar,ctab)),1),1)
    This would work for the previous sheet
    Code:
    $(substr,$(getvar,ctab),1,1)$(-,$(substr,$(getvar,ctab),$(strlen,$(getvar,ctab)),1),1)
    The differences between the two are the + and -. This will take the current layout tab (system variable 'CTAB') and remove the last character. It will then take the last character and either add or subtract 1.

    This could potentially be added to an attribute definition within a block.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #5
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    Since I'm lazy and hat to work harder than I have to, I'd personally use SheetSet Manager, and the sheet number to handle this.

  6. #6
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,086
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    And then the field is tied to a specific sheet set and will have to be modified for every sheet. I don't use either of these methods.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #7
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    Opie,

    Thank you for your help. unfortunately, your code is not giving me what I need.

    I have the tab named LP-1.01 and your code is giving me just L2, I need it to give me LP-1.02, also I have other sheets like LI-1.01 so I only want it to look at and change the numbers after the decimal by 1. Can you please tell me how I can change your code so it jumps by 3 numbers, etc.?

    Regards,

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,086
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    You're right. I wasn't testing with the right data. Let me update it later this morning.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  9. #9
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,086
    Login to Give a bone
    0

    Default Re: Matchline with sheet number field increase/decrease

    It may be easier to set it as an AutoLISP variable using a Reactor instead of the DIESEL expression. This DIESEL expression will fail when the second to last number needs to be a different character than it currently is. The number you are looking to change is everything paste the dash in the layout tab name. Finding the location of the dash in that name using DIESEL could be cumbersome to code.

    The issue with the AutoLISP variable would be the variable needs to be assigned each drawing session. Another option would be to save the value in something a little more permanent, such as a document property. To update that document property could be automated using AutoLISP, but the property could also be manually updated.

    Here is the updated DIESEL expression for the previous page.

    Code:
    $(substr,$(getvar,ctab),1,$(-,$(strlen,$(getvar,ctab)),1))$(-,$(substr,$(getvar,ctab),$(strlen,$(getvar,ctab)),1),1)
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. 2012: Cannot Decrease Size of File
    By bt1101011 in forum AutoCAD General
    Replies: 2
    Last Post: 2013-03-18, 04:50 AM
  2. Increase the number of active view ports available
    By Wish List System in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2012-07-19, 07:48 PM
  3. Replies: 27
    Last Post: 2008-07-22, 10:58 PM
  4. Show View Number and Sheet Number in the same field?
    By kkinchen in forum AutoCAD Fields
    Replies: 3
    Last Post: 2007-03-19, 05:48 PM
  5. Replies: 6
    Last Post: 2006-08-02, 12:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •