Partial Data Fields

Hullo,

I have tried searching with google and havent had much luck.

Autocad has the ability similar to Excel to have a custom data field (eg. modifying a date data field from 05/28/1988 to 28/05/88 just by changing variables.

I would like to be able to have a data field that automatically uses the file name as the drawing number - but with out the guff at the end of the file name  (eg. 1900-SS-S-0001 Control Plan R01 becomes within the paper space drawing number field 1900-SS-S-0001 )

I would also like to add a Revision Field that looks at the end of the file name.

Any help even if it is - "It cant be done" is appreciated. 

I am not the best user of the forums. 

Thanks

John

Parents
  • What you are explaining in your request would have to be Text Fields. This type of text can connect to properties of Elements, Models or as you have requested the File. The following Wiki article should explain this reasonably ok.

    http://communities.bentley.com/products/microstation/w/microstation__wiki/12506.text-fields-auto-updating-annotations

    Regards
    Andrew Bell
    Technical Support
    Bentley Systems

  • The file name field is restricted, I believe - not allowing me to only use part of the file name eg : 1900-SS-S-0001 Control Plan R01 ---- using only 1900-SS-S-0001

    Can I modify what part of the file name I can use? first part last part etc.
  • At the risk of really highlighting my lack of knowledge with microstation - how do I get that expression simply in to VBA? create a new file in the vba editor and just type that in? or would i need additional code to get the code associated with the field?

    but this is basically all I'm after.

    Yes the "R01" is the revision field I want to also create

    once I get/understand the file name one I believe it will give me enough info to create the same for

    -Revision
    -Scale of the main attached xref (to automatically fill in the scale info)
    - The Job number (first 4 digits of file name)

    Thanks for this.

    J
  • If the filename is always 14 characters, simple way is use Engineering Font and create a shape with fill to cover the rest of the texts, same method for the revision field
  • Another question is how site/configuration dependent are expressions. If were talking about populating "text" in a dgn is it static or dynamic? Using available fields might be a bit more stable.
  • If you want to use Named Expressions, you can avoid VBA. In the Titleblock you'd simply place something like "$Rev$" and Use Text substitutions in a Pen Table to replace "$Revs" at print with whatever the expression evaluates to (for your file "R01").

    First 14 characters, and first 4 characters are easy with Named Expressions as well.

    If e.g. the text "$StdFileName$" is always placed in your titleblock, and the Pen Table replaced that at Print with "1900-SS-S-001"

    Scale of the "main attached xref" is going to be trickier to automate, unless this is equal to the Active Annotation Scale.

    If not, you'll need a fixed way of identifying the "Main" Reference in all your files.

    If you want Tags filled in on placement of the titleblock, you'll need to have a special command that does what you want it to do. This will be a near impossible task for a relatively novice user, unless you have a lot of time on your hands and are willing to learn MicroStation VBA. Automating these kind of tasks isn't really beginner level stuff.

    In this file I made the Named Expressions, you could change the extension to dgnlib and add it to a location contained in the MS_DGNLIBLIST variable:

    1900-SS-S-001 Control Plan R01.dgn

    Pentable with just the Text substitutions:

    MyPenTable.tbl

    If you print a page containing the words $Job$, $Rev$ and/or $StdFileName$, with the pentable attached those words will be replaced with 1900, R01, 1900-SS-S-001 respectively.

  • john,

    The named expressions text just is very good  inside the  title block,  but it wont   keep your plans up to date  with extra revisions in the title block ie history it wont  create a excel list  of all you drawings and their  title block contents which you can reword  in excel and send to all your drawings without manually  opening each one ie  in non graphic mode very very very fast as well use this a as  drawing register and transmital and use it to create table of contents  sheet drawings  for projects.. 

    look at this  you tube to see  how easy  it is to use 

    https://www.youtube.com/watch?v=hnTXpkDYaAQ&list=PLXpeM9WOKJhlkfSDtTC-riQK3KD6A3gcg

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

Reply
  • john,

    The named expressions text just is very good  inside the  title block,  but it wont   keep your plans up to date  with extra revisions in the title block ie history it wont  create a excel list  of all you drawings and their  title block contents which you can reword  in excel and send to all your drawings without manually  opening each one ie  in non graphic mode very very very fast as well use this a as  drawing register and transmital and use it to create table of contents  sheet drawings  for projects.. 

    look at this  you tube to see  how easy  it is to use 

    https://www.youtube.com/watch?v=hnTXpkDYaAQ&list=PLXpeM9WOKJhlkfSDtTC-riQK3KD6A3gcg

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

Children
No Data