This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Automatic Drawing Naming Standard

Former Member
Former Member
Hello! I just got m-files up and running, so I'm fairly new the VBscript on it. I'm hoping someone could help me out with my code.

I would like to automatically name all drawings in the class "Drawings" that are inserted based on two properties and an auto number.
Property 1: Drawing type (value list consisting of "ELE", "MEC", "CIV", "STR", etc.)
Property 2: Project (choose from list of existing Projects)
Auto-number: Counter which increments when documents by looking at other drawings of the same project having the same Property 1 & Property 2

For Example
Drawing 1
Drawing Type: ELE
Project: PARKING

=> Output: PARKING-ELE-01

Drawing 2
Drawing Type: ELE
Project: PARKING

=> Output: PARKING-ELE-02

Drawing 3
Drawing Type: MEC
Project: PARKING

=> Output: PARKING-MEC-01

And so on. So since a Document 1 exists with "PARKING" as a project and "ELE" as a drawing type, then Document 2 gets incremented by 1.

Is there anyone who has done something similar? I would really appreciate it if I could get some guidance with coding the Calculated Value (VBscript).

Thanks!

Parents Reply Children
No Data