[Plugin] Title block from title v1.2 (20110713)
-
**%(#408040)[EDIT : New version 1.2 (20110713) :
- Hlp file added
- %DIR variable added. Puts directory of the drawing in cartouche)
- %PAGE variable added. Puts name of the current scene in the cartouche. And every change of page will also modify cartouche.
- %N variable added. Puts NĀ° of the scene.
- Modify call of case change.
- Now you must show where the information is in the title. So now you can change order of title information.
- / symbol added. Put it at the end of a field value in settings, and script will not put information on a new line.
EDIT : New version (1.101): small bug.]**
This post is just a copy of Help file in the package. Sorry for my poor english...
1. Overview
Matt_Cartouche is a script that inserts a title block (in fact a simple screen text) which is composed of elements included in the drawing title and some variables.
2. Installation
Just unzip Matt_Cartouche.zip in the plugins folder.
This file is composed of : [floatr:2tdluwvt][/floatr:2tdluwvt]
-
The main script (āMatt_Cartouche.rbā)
-
A folder called āMatt_Cartoucheā :
-
Images for the toolbar
-
Some translation files
-
Settings file (āsettings.txtā)
[floatr:2tdluwvt][/floatr:2tdluwvt]
After installation, run SU. Matt_Cartouche will create a sub menu in āpluginsā menu and a toolbar composed of two icons.3. To use Matt_Cartouche
Before using this script you must configure your drawing title and cartouche settings.a) Drawing title
To find informations in the title, Cartouche will need a separator. You can use separator you want, but it must be written in settings. For example:ARMSTRONG#New Orleans#Trumpet#ind_A.rb
You can see a separator in the title (ā#ā), and 4 informations: āARMSTRONGā, āNew Orleansā, āTrumpetā and āind_A.rbā. For now Cartouche doesnāt know what this informations correspond to, you will help it in settings.
b) Cartouche settings presentation
You can open it by clicking on the second icon or going to menu plugins/Cartouche/Settings. Settings is a dialog box with some fields.
You can see Cartouche can have 8 fields. Fields can be composed of simple texts, variables, and title parts. Let me explain you how it works.c) Title order vs Cartouche order
You have to distinguish title informations order, and cartouches fields order. Thatās very important. In my example ARMSTRONG is the first title information, but you can put it at the end of the cartouche! Numbers after @ symbol in the fields value are localisation of title informations.d) Cartouche settings explanations
The most important thing to understand with cartouche is field value parameters. The rest is very simple.
As you can see in the cartouche settings example, there are some symbols in field value.- @ -> Means āthe field value is in the titleā.
- 1 -> Means āThe filed value is title information NĀ°1ā.
-
-> Means āThis information will appear capitalized in the cartoucheā.
- < -> Means āThis information will appear with same case in the cartoucheā.
- (-1) -> Means āJust write last character in the cartoucheā.
- %DATE -> This a variable, it will put current date in the cartouche.
- %DIR -> This is a variable, it will put directory of the drawing in the cartouche.
- %PAGE -> This is a variable, it will put current page in the cartouche. Each change of page will also change this value.
Field 1 value ā@1>ā means āThe field 1 value is title information NĀ°1 and will be capitalizedā.
Field 3 value ā@3<ā means āThe field 3 value is title information NĀ°3 and will be written as you write in the titleā.
Field 4 value ā%DATEā means āThe field 4 will be the current dateā.
Field 5 value ā@5>(-1)ā means āThe field 5 value is title information NĀ°5, will be capitalized and just last character will be in the cartoucheā.
Field 6 value āMNā means āThe filed 6 will be āMNāā.You can't modify variable case. So you can't use >, <, = or (-1), (1..1), etc.
For information to take from the title, You MUST follow this order:
@ : If you donāt put it, Cartouche will understand what is written is just some text
Integer : To tell to cartouche where information is placed in the title
<>= : To change case of the information
(ā¦) : Optional symbol, for isolating a part of the information
/ : Optional symbol, for staying on current cartouche linee) Tooltip mode
This is an option in cartouche settings. %PAGE variable puts scene tab name in the cartouche. If you validate this option, %PAGE variable will be changed. So if you have an iso view in your scene, name of the iso view will replace scene tab name.f) Cartouche separator
These 2 lines in settings are used with / symbol. When this symbol is at the end of a line in settings, Cartouche understands that information will not be a new text line. So it takes 1st separator to start and 2nd separator at the end.g) Last tool: Record existing cartouche
This tool is used in case of Cartouche creates another text above existing. For example if you delete an existing cartouche, and undo your action, Cartouche will loose text link.h) Examples
With Armstrong example, here is the setting for putting a cartouche:
And with the settings example below, here is the result:
That's all! Do not hesitate to tell me if something goes wrong.
-
Hi, Matt666:
This looks to be very handy.
By way of clarification, does the value in the "X on screen" represent a proportion of the viewing area, or what? If you increase the value, does it enlarge the text?
And, I assume the @ sign is just a variable for the example, otherwise it would say FIELD1? -
Hi mitcorb, and thank you for your answer.
X or Y on screen determinates position of the cartouche in the drawing. Cartouche will move if you change the values. It doesn't change font size.
@ sign means 'value is in the title'. In example above, @ sign is written in value of field 1, and "affaire" (site in english) is written in name of field 1. So plugin will put "Affaire : "+ title field 1 (Affaire : TEST1) on the first line.
Field 1 is the first field in the title. Not in Cartouche. But I can modify script if you want. Field 1 can be the first field in the cartouche. Why not? -
Hi, Matt:
I am not asking you to change anything. I am not so well trained in use of databases, and I am simply trying to understand the usage, or "grammar". -
Ok ,I understand. I have modified plugin, see first post. V1.1
-
So, then, whatever one has named the file is then placed in the database, but you must use # as part of the title, and in the order of the fields. The @ sign tells the cartouche generator to look at the title for the appropriate value?
-
Absolutely.
'#' sign is just the separator of all informations in the drawing title. If you want to use another sign, change title AND whange separator in the cartouche settings.
@ = just look at the title. Just one thing: You can't put ONLY 3rd title information in the cartouche. First and second title information must be in the cartouche. I will try to improve this plugin soon.Just a little improvment : If you put '@@' sign in the value field, information will be capitalized. Otherwise, it keeps title case.
-
Great idea Matt. Thank you for sharing!
-
Thank you Adam!
-
Interesting...thank you. Maybe this plugin will put the order in my su files
-
Hi srx, hope this little script will help you...
-
A small bug-fix.
-
New version soon available (tomorrow). 2 new variables : %DIR (to add directory of the drawing in cartouche) and %PAGE (an interesting variable that add name of the current scene in the cartouche. And every change of page will also modify cartouche).
A help file is here now. I modified call system of case change (no @@, but < or >). And now you can change order of title information.
-
Matt, would it be possible to tie this into the Scene Tabs to change page numbers and label each view according to the named scene tabs? (i.e. Front Elevation, Rear Perspective, etc.)
-
sorry, but I cannot find the link to download this plugin!
-
That's normal, Edson. I work on some improvments, and I will upload it soon.
-
thanks, matt, I thought I had a problem.
-
thanx for ur nice plugins
but Download from Where???
-
Unclex, Matt indicated he was working on improvements. He must have removed the link temporarily.
-
Ok, you can download plugin at the end of the first post.
Enjoy!
Advertisement