Results 1 to 6 of 6

Thread: Array attributes in a dynamic block

  1. #1
    Member
    Join Date
    2001-03
    Posts
    4
    Login to Give a bone
    0

    Default Array attributes in a dynamic block

    Hello all:

    I know this question has been asked before but it’s now my turn to ask and here I go: as far as I know an attribute in a dynamic block cannot be arrayed but, is it possible to develop a formula inserted as a field to do the trick?

    I work for a very large railway corporation and here we use AutoCAD 2006. I know it’s and old software but the company I work for is very big and we cannot afford to update thousands of software licenses every other week. In my office we create layout plans for track regeneration programs and do feasibility studies to improve network’s efficiency. Amongst other things those plans have blocks that represent different lengths and types of rails, sleepers, ballast profiles and the like. But in the railway arena we lay down sleepers of the same family for kilometres in a row, so in a plan plotted to 1:2000 scale instead of showing one solely centered text (something like M450 which is a standard type of sleeper and an attribute of my block) text it would be nice to show the same feature every 10 cm (200 meters). I know this could be cumbersome for some to read but if the same sleeper is to be laid for 15 km (around 9 miles) my request makes sense, particularly when consulting the plot on the ground in a windy and/or snowy day.

    I’ve created an initial dynamic block, rectangle shaped, to represent let’s say a standard type of sleeper: it depicts the sleeper's type (wood, concrete, composite, etc) and shows and updates its starting and ending progressives as moved or stretched.

    Here’s where the array issue comes in: sure I can create a piece of text and array it as I wish but we use about 40 different types of sleepers, 30 or so different profiles of rail and so the thing goes for the fastenings, culverts, catenary posts, etc. This way a library can easily reach hundreds of symbols.

    All that said is there a way an attribute (value M450 for example) can be arrayed by means of a formula nested somehow, somewhere in the block definition, using my old AutoCAD 2006?

    I've placed the same post in the sharing forum of DB because I did not know which one is the appropiate one, thus could moderators kindly delete the ofending duplicate please?

    Thank you very much for reading and for your help

    Hugo Mendez

  2. #2
    Active Member
    Join Date
    2010-06
    Posts
    91
    Login to Give a bone
    0

    Default Re: Array attributes in a dynamic block

    Hi-

    Could you post an example of what you're working on? It would make it easier to help you.

    Sarah

  3. #3
    Member
    Join Date
    2001-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Array attributes in a dynamic block

    Hello Sarah:

    Thank you very much for your answer, I’m sorry it has taken a bit long to fill your request but here’s the block as demanded

    Before going on with the array issue there’s still a little problem I would like ask for help to resolve: I don’t know how to limit the length of the ending string of my block, the one that shows the progressive where the sleepers’ chunk ends. By that I mean to limit the last three characters of the resulting chain. Let’s say that that my chain has to represent a length of 450m, if the starting progressive is 120, the resulting number will be 120+450=570. Up to there no problem. But, if the sleepers section’ length is 1130m, then I’m in trouble as the start will always show 120 but the end will show 120+1130= 1250 when in fact I only want to see 250. Not to say that if the block is inserted at progressive 5230 and it is 865m long it will show 5230 at the start and 5230+865=6095 at the end, when I just need to see 230 and 095.

    The sheet’s layout of my plans shows the position of every kilometer marker so I’ve no need to show the thousands in the blocks, the hundreds to the nearest meter suffice.

    Here’s where the cavalry comes in as again, I do not know how to limit the length of the string at least in the “formula” I nested for the expression of the PK_FIN attribute.

    Little note: although I’m not French, I work in France, so here the labels we use are written in French.

    Any help will be greatly appreciated, please let me know if the file loads OK.

    I work with AutoCAD 2006

    HUGO
    Attached Files Attached Files

  4. #4
    Active Member
    Join Date
    2010-06
    Posts
    91
    Login to Give a bone
    0

    Default Re: Array attributes in a dynamic block

    The file loaded successfully.

    I think you might be able to use a DIESEL expression to help you create a field that ignores the first digit of your resulting number. I don’t know enough DIESEL to help you out, but if you’re unfamiliar with it you could try Google. Also other users might see this post and help.

    Take a look at this post and see if this helps you figure out how to show your incremental distances.

  5. #5
    Member
    Join Date
    2001-03
    Posts
    4
    Login to Give a bone
    0

    Default Re: Array attributes in a dynamic block

    Hi Sarah and all readers:

    Thanks for your answer.

    Yeah, I’ve thought of DIESEL as well but so far I haven’t found a Dummies guide to an easy understanding, implementation and usage of this very powerful resource.

    Also, in my searches I had seen before the post you point to but unfortunately it didn’t help me much as there they talk about a ladder. A ladder unfolds vertically and the solution for adding the incoming steps is the visibility states: as long as the ladder unfolds, it triggers the visibility of the next step.

    What I am talking about here is something that rules out horizontally in one go without any breaks and therefore visibility states I think are of no use, so here I am still trying to resolve these two questions:

    *) how do I force AutoCAD to drop ALL the numbers greater that 999 that result of the formula calculation, I mean those at the beginning of the resulting string so I can see only the last three digits (the hundreds)

    *) then, still have to find a second formula, embedded in the first one who will array any given text

    The result I dream of is a rectangular block with three attributes, one at each end and a central one. The block shall host an expression that at first, based on its insertion point and the length of the stretching, calculates the value of the ending point, expressing that value as a truncated number if need arises (if >1000, it shows 000), for both the starting and the ending point.

    Next, the formula should be able to insert a “something” whose value will be a named text, placed at a given pace: 100, 300, 500, being each time the same, for example “Strawberry fields”, inserted many times, for as long as the block goes for.

    So, if the block begins at 150 and is 300 units long it will normally end in 450 and “Strawberry fields” will be seen only once (at 300). As life is not that easy, if either the block begins or ends (or both) beyond 999, I only want to see 3 digits regardless of whatever the thousands are and that for both extremes. If it begins at 250 and ends 975 units away, “Strawberry fields” will be seen six times: at the 300, 500, 700, 900, 1100 and 1300 positions, its end reading 225 (and NOT 1225).

    I’m not even near of being a gifted person and hence need help to resolve the problem. I can appreciate this is a recurrent question in the forum and think that if we join efforts and (wishfully) get a satisfying result we will all be able to rap the benefits.

    The previous post includes a small .dwg of what I’ve done so far, but do not know how to go from there.

    Any ideas on how formulate those expressions?

    Thank you very much and kind regards

    Hugo Méndez

  6. #6
    Retired Forum Staff Chris.N's Avatar
    Join Date
    2001-12
    Location
    Rochester, MN
    Posts
    2,561
    Login to Give a bone
    0

    Default Re: Array attributes in a dynamic block

    can you post a screen shot of what you are looking for in the finished product? I'm struggling with the request and can sometimes understand better when i see what the finished result needs to look like.
    Sometimes, i get lost in my own thoughts and need to ask directions to find my way back.
    S&D DB Sharing Forum

Similar Threads

  1. Array Attributes in Dynamic Block
    By boyerd in forum Dynamic Blocks - Technical
    Replies: 5
    Last Post: 2008-08-13, 01:47 PM
  2. Make Array of Dynamic Block Attributes
    By CADdancer in forum VBA/COM Interop
    Replies: 5
    Last Post: 2007-08-07, 11:44 AM
  3. Replies: 21
    Last Post: 2007-03-20, 02:03 PM
  4. Array attributes in Dynamic Blocks
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-11-08, 12:53 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
  •