Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
7392f04b
Commit
7392f04b
authored
Feb 11, 2015
by
Ronald Sousa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added sheet information to the net file. i.e. sheet number, human path name and timestamp
- update bom_with_title_block_2_csv.xsl
parent
534a3c1f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
62 deletions
+56
-62
netform.cpp
eeschema/netform.cpp
+34
-34
bom_with_title_block_2_csv.xsl
eeschema/plugins/bom_with_title_block_2_csv.xsl
+16
-28
sch_sheet_path.h
eeschema/sch_sheet_path.h
+6
-0
No files found.
eeschema/netform.cpp
View file @
7392f04b
...
...
@@ -653,12 +653,15 @@ static XNODE* node( const wxString& aName, const wxString& aTextualContent = wxE
XNODE
*
NETLIST_EXPORT_TOOL
::
makeGenericDesignHeader
()
{
SCH_SCREEN
*
screen
;
SCH_SCREENS
screenList
;
screen
=
screenList
.
GetFirst
()
;
SCH_SCREEN
*
screen
;
XNODE
*
xdesign
=
node
(
wxT
(
"design"
)
);
XNODE
*
xsheetNode
;
XNODE
*
xsheetInfo
;
XNODE
*
xcommentNode
;
XNODE
*
xpagesNode
;
XNODE
*
xpageNode
;
wxString
sheetNumTxt
;
wxString
sheetNumTxtFormat
=
wxT
(
"%d"
);
// the root sheet is a special sheet, call it source
xdesign
->
AddChild
(
node
(
wxT
(
"source"
),
g_RootSheet
->
GetScreen
()
->
GetFileName
()
)
);
...
...
@@ -668,46 +671,43 @@ XNODE* NETLIST_EXPORT_TOOL::makeGenericDesignHeader()
// which Eeschema tool
xdesign
->
AddChild
(
node
(
wxT
(
"tool"
),
wxT
(
"Eeschema "
)
+
GetBuildVersion
()
)
);
xdesign
->
AddChild
(
xsheetNode
=
node
(
wxT
(
"sheets"
)
)
);
/*
Export the sheets information
*/
SCH_SHEET_LIST
sheetList
;
xdesign
->
AddChild
(
xpagesNode
=
node
(
wxT
(
"sheets"
)
)
);
for
(
screen
=
screenList
.
GetFirst
();
screen
!=
NULL
;
screen
=
screen
List
.
GetNext
()
)
for
(
SCH_SHEET_PATH
*
sheet
=
sheetList
.
GetFirst
();
sheet
;
sheet
=
sheet
List
.
GetNext
()
)
{
xpagesNode
->
AddChild
(
xpageNode
=
node
(
wxT
(
"sheet"
)
)
);
// get the string representation of the sheet index number.
// Note that sheet->GetIndex() is zero index base and we need to increment the number by one to make
// human readable
sheetNumTxt
.
Printf
(
sheetNumTxtFormat
,
(
sheetList
.
GetIndex
()
+
1
)
);
xpageNode
->
AddChild
(
node
(
wxT
(
"number"
),
sheetNumTxt
)
);
xpageNode
->
AddChild
(
node
(
wxT
(
"names"
),
sheet
->
PathHumanReadable
()
)
);
xpageNode
->
AddChild
(
node
(
wxT
(
"tstamps"
),
sheet
->
Path
()
)
);
screen
=
sheet
->
LastScreen
();
TITLE_BLOCK
tb
=
screen
->
GetTitleBlock
();
x
sheetNode
->
AddChild
(
xsheetInfo
=
node
(
wxT
(
"sheet
"
)
)
);
x
pageNode
->
AddChild
(
xsheetInfo
=
node
(
wxT
(
"page
"
)
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"title"
),
tb
.
GetTitle
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"company"
),
tb
.
GetCompany
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"revision"
),
tb
.
GetRevision
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"issueDate"
),
tb
.
GetDate
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"comment1"
),
tb
.
GetComment1
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"comment2"
),
tb
.
GetComment2
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"comment3"
),
tb
.
GetComment3
()
)
);
xsheetInfo
->
AddChild
(
node
(
wxT
(
"comment4"
),
tb
.
GetComment4
()
)
);
}
/* @todo might do a list of schematic pages
<page name="">
<title/>
<revision/>
<company/>
<comments>
<comment>blah</comment> <!-- comment1 -->
<comment>blah</comment> <!-- comment2 -->
</comments>
<pagesize/>
</page>
:
and a sheet hierarchy report here
<sheets>
<sheet name="sheetname1" page="pagenameA">
<sheet name="sheetname2" page="pagenameB"/> use recursion to output?
</sheet>
</sheets>
*/
xsheetInfo
->
AddChild
(
node
(
wxT
(
"source"
),
screen
->
GetFileName
()
)
);
xsheetInfo
->
AddChild
(
xcommentNode
=
node
(
wxT
(
"comments"
)
)
);
xcommentNode
->
AddChild
(
node
(
wxT
(
"comment"
),
tb
.
GetComment1
()
)
);
xcommentNode
->
AddChild
(
node
(
wxT
(
"comment"
),
tb
.
GetComment2
()
)
);
xcommentNode
->
AddChild
(
node
(
wxT
(
"comment"
),
tb
.
GetComment3
()
)
);
xcommentNode
->
AddChild
(
node
(
wxT
(
"comment"
),
tb
.
GetComment4
()
)
);
}
return
xdesign
;
}
...
...
eeschema/plugins/bom_with_title_block_2_csv.xsl
View file @
7392f04b
...
...
@@ -73,8 +73,8 @@
<xsl:template
match=
"/export/design/sheets/sheet[1]"
>
<xsl:choose>
<xsl:when
test=
"title !=''"
>
<xsl:text>
Title,
</xsl:text><xsl:value-of
select=
"title"
/><xsl:text>
&nl;
</xsl:text>
<xsl:when
test=
"
page/
title !=''"
>
<xsl:text>
Title,
</xsl:text><xsl:value-of
select=
"
page/
title"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
Title,Not Set
</xsl:text><xsl:text>
&nl;
</xsl:text>
...
...
@@ -83,8 +83,8 @@
<xsl:choose>
<xsl:when
test=
"company !=''"
>
<xsl:text>
Company,
</xsl:text><xsl:value-of
select=
"company"
/><xsl:text>
&nl;
</xsl:text>
<xsl:when
test=
"
page/
company !=''"
>
<xsl:text>
Company,
</xsl:text><xsl:value-of
select=
"
page/
company"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
Company,Not Set
</xsl:text><xsl:text>
&nl;
</xsl:text>
...
...
@@ -92,8 +92,8 @@
</xsl:choose>
<xsl:choose>
<xsl:when
test=
"revision !=''"
>
<xsl:text>
Revision,
</xsl:text><xsl:value-of
select=
"revision"
/><xsl:text>
&nl;
</xsl:text>
<xsl:when
test=
"
page/
revision !=''"
>
<xsl:text>
Revision,
</xsl:text><xsl:value-of
select=
"
page/
revision"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
Revision,Not Set
</xsl:text><xsl:text>
&nl;
</xsl:text>
...
...
@@ -101,39 +101,27 @@
</xsl:choose>
<xsl:choose>
<xsl:when
test=
"issueDate !=''"
>
<xsl:text>
Date Issue,
</xsl:text><xsl:value-of
select=
"issueDate"
/><xsl:text>
&nl;
</xsl:text>
<xsl:when
test=
"
page/
issueDate !=''"
>
<xsl:text>
Date Issue,
</xsl:text><xsl:value-of
select=
"
page/
issueDate"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
Date Issue,Not Set
</xsl:text><xsl:text>
&nl;
</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates
select=
"page/comments/comment"
/><xsl:text>
&nl;
</xsl:text>
</xsl:template>
<xsl:template
match=
"page/comments/comment"
>
<xsl:choose>
<xsl:when
test=
"comment1 !=''"
>
<xsl:text>
Comment,
</xsl:text><xsl:value-of
select=
"comment1"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when
test=
"comment2 !=''"
>
<xsl:text>
Comment,
</xsl:text><xsl:value-of
select=
"comment2"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when
test=
"comment3 !=''"
>
<xsl:text>
Comment,
</xsl:text><xsl:value-of
select=
"comment3"
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when
test=
"comment4 !=''"
>
<xsl:text>
Comment,
</xsl:text><xsl:value-of
select=
"comment4"
/><xsl:text>
&nl;
</xsl:text>
<xsl:when
test=
". !=''"
>
<xsl:text>
Comment,
</xsl:text><xsl:value-of
select=
"."
/><xsl:text>
&nl;
</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- the table entries -->
<xsl:template
match=
"components/comp"
>
<xsl:value-of
select=
"@ref"
/><xsl:text>
,
</xsl:text>
...
...
eeschema/sch_sheet_path.h
View file @
7392f04b
...
...
@@ -324,6 +324,12 @@ public:
*/
int
GetCount
()
const
{
return
m_count
;
}
/**
* Function GetIndex
* @return the last selected screen index.
*/
int
GetIndex
()
const
{
return
m_index
;
}
/**
* Function GetFirst
* @return the first item (sheet) in m_List and prepare calls to GetNext()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment