Class Reference project

Manager for layout and schematic windows and its linkage. More...

Member

layout* currentLayout()
schematic* currentSchematic()
textEdit* currentTextEditor()
void closeLayout(layout *l)
void closeLayout3d(layout3d *l)
void closeSchematic(schematic *s)
bool defaultGui
textEdit * getCentralTextEditor()
layout* getLayout(schematic *s)
layout3d* getLayout3d(layout *l)
textEdit* getOpenTextEditor()
schematic* getSchematic(layout *lay)
bool hasSchematic(layout *lay)
int lastReportRang()
string lastReportText()
layout* newLayout()
layout* newSchematic()

Detailed Description

The static project class creates new layout and schematic windows. It can also link both types of windows for a schematic driven layout.

Member Function Documentation

Member Function Documentation


static layout* project::currentLayout()

If the window executing the script is linked to a layout window, the point to this layout window is returned. In c++ script this will be the same window that can be accessed with the layout keywork directly. For in process Python scripts this is the only way to receive the pointer to this window. A NULL pointer is returned, if the script starting window is not linked to a layout window.

Examples:

// direct ways to access the calling window:
layout->drawing->point(0,0);
layout->drawing->point(1000,2000);
layout->drawing->box();

//receiving the pointer via the project class:
layout *l=project::currentLayout();
if (l==NULL) l=project::newLayout();
l->drawing->point(0,0);
l->drawing->point(1000,2000);
l->drawing->box();
 l=project.currentLayout()
 if l is None: l=project.newLayout(); 

 #the existing layout window is used for this point
 l.drawing.point(0,0)
 l.drawing.point(1000,2000)
 l.drawing.box()

(introcuded with release 20260616)


static schematic project::currentSchematic()

The same as project::currentLayout() for the schematic window.

(introcuded with release 20260616)


static textEdit* project::currentTextEditor()

The same as project::currentLayout() for the textEdit window.

(introcuded with release 20260616)


static void project::closeLayout(layout *l)

closes/unregistered the given layout window


static void project::closeLayout3d(layout3d *l)

closes/unregistered the given layout3d window


static void project::closeSchematic(schematic *s)

closes/unregistered the given schematic window


static bool project::defaultGui

If true new layout and schematic windows will have std tool bars and menus. If false any menu and tool bar had to be added by hand.


static textEdit * project::getCentralTextEditor()

Returns: A pointer to the central text editor used to display all reports and error messages.


static layout* project::getLayout(schematic *s)

Returns: a layout window linked with the given schematic window. If a linked layout window does not exist, it will be created.


static layout3d* project::getLayout3d(layout *l)

Returns: a layout3d window linked with the given layout window. If a linked layout3d window does not exist, it will be created.


static textEdit* project::getOpenTextEditor()

Returns: A pointer to an open text editor. Opens a new TextEditor, if none is open.)


static schematic project::getSchematic(layout *lay)

Returns: a schematic window linked with the given layout window. If a linked schematic window does not exist, it will be created.


static bool project::hasSchematic(layout *lay)

Returns: true, if the layout window lay has a connected schematic window.


static int project::lastReportRang()

Some more complex operation create a report that may be displayed to the user. When such a report is display depends on the user settings. With this method the range of the report can be obtained. (introduced with release 20250129)

Values: Report Rang:
0 fatal error
1 error
2 string warning
3 warnings
4 information
5 no further comments

static string project::lastReportText()

Returns: the full report independend if it was displayed to the user or not. (introduced with release 20250129)


static layout* project::newLayout()

Creates a new layout window and returns a point to it. In C++ macros please use the keyword class to separate the class layout from the existing pointer layout.

class layout *myLayout=project::newLayout();
myLayout->open("filename");

static layout* project::newSchematic()

creates a new schematic window