Macro CartoucheFC Full

From FreeCAD Documentation
Revision as of 21:46, 2 February 2019 by Galou breizh (talk | contribs) (Replace embedded code with the link to the official repository)
Other languages:

Macro_CartoucheFC_Full

Description
This macro is a complete application, it allows to fill the cartridge of the drawing sheet with full editabletext (For Drawing Module).

Macro version: 00.10
Last modified: 2017-02-15
Author: Mario52
Author
Mario52
Download
None
Links
Macro Version
00.10
Date last modified
2017-02-15
FreeCAD Version(s)
None
Default shortcut
None
See also
None

Description

This macro is a complete application, it allows to fill simply all the fields of the cartridge

Choice in the page Misc_templates_Full

Here the order of filling in the line FreeCAD texteditable. The date and time fields are separated by a "space negative space" " - " and constitute a single line textedit.

CartoucheFC_Full

Use

PS: Some characters such as & $ are not accepted (and possibly other special characters).

If you have any questions or want to add a function, you can address you on the french forum Remplir cartouche

  • The window remains above other Windows, thereby controlling the cartridge without leaving the program.
  • Copy the code into a file named Macro_CartoucheFC_Full.FCMacro and place it in your usual macros directory.
  • After you have created your drawing sheet using the Drawing of FreeCAD module, run the macro Macro_CartoucheFC_Full.
  • At the opening, the program will register in memory all data already present in the cartridge of the sheet (if they are filled), all these data will be automatically returned to using the button Memo and kept in memory until the closure of the programme.
  • First select your page to work
  • Date button D. and time H. displayed the date and time of the system.
  • The date format depends on the selected symbol EU or US which determines the regional format. Change does not happen automatically (for the case or you have entered a date manually) you must again click buttons dates if you change the symbol (check before printing).
  • Choice your format page
  • Button Symbole EU or US change the meaning of the symbol of projection "Select your Symbol" is displayed by default, and then the active symbol appears. Click on the button and check the leaf symbol, click a second time to modify the symbol.
  • The choice of this symbol, affects the date format EU = dd/MM/yyyy and US = MM/dd/yyyy.
  • Attention: this command does not pass through the button Apply and immediately changes the symbol to each presses on the key, always check if you have the appropriate symbol on your worksheet.
  • Button Clean Clears all fields in the cartridge. You can revert to the original data using the button Memo.
  • Button Apply saves all fields of the cartridge in the sheet. You can revert to the original data using the button Memo (except for the regional symbol that works in independent and is effective immediately).

Code

The icon for you toolBar

Macro_CartoucheFC_Full.FCMacro

The lastest version of the macro is to be found at DrawingTitleBlock.FCMacro but the easiest way to install this macro is through the Addon Manager.

Other

The fields have no length limit, check your cartouche.

This program creates a drawing representing the regional projection symbol on your project, do not touch it is registered therefore hidden form invisible.

If you want it to be cleared uncomment the commented lines and vice versa

#    App.getDocument(App.ActiveDocument.Name).removeObject("Symbol_EU")
    FreeCADGui.getDocument(App.ActiveDocument.Name).getObject("Symbol_EU").Visibility = False

et

#    App.getDocument(App.ActiveDocument.Name).removeObject("Symbol_US")
    FreeCADGui.getDocument(App.ActiveDocument.Name).getObject("Symbol_US").Visibility = False

(I had some times an error in execution when the symbol was erased)

This module works with the drawing sheet included in FreeCAD this sheet is called Page, do not change the name of this sheet!

Revision

ver "00.10" : 15/02/2017 : tuning page multiple (It is possible to lose a page if there are too many)

ver "00.09" : 10/02/2017 : add radio button for choice symbol and correct the placement symbol in the separate page

ver "00.08 : 06/02/2017 : the dialog box name page accept the accent

ver "00.07 : 05/02/2017 : add save cartouche with name page (for multi page in projects) ps: not for character accentuate "àùé ..."

ver 00.06 : 13/10/2016  : selection format page and position for the symbol convention (for FreeCAD ver 0.17)

ver 5 : 08/08/2014 PyQt4 and PySide