Hello, |
Re: Column number in DXL column's
I have the nagging memory that I read somewhere in a related post that a "Column getCurrentColumn()" routine exists in DOORS 9.x, but I might be wrong here. // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title(c) ""}
. // Get a handle to the current column /* Layout DXL does not have a mechanism for getting e.g. the current column title. This subroutine can be used for getting a handle to the current column USAGE: The column must of course be a layoutDXL column. The first line of code must be a comment containing a user-defined unique identifier. The same identifier must be used as parameter in the call to Column getCurrentColumn(string thisIdentifier) EXAMPLE: // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title(c) ""} */ // ----------------------------------------------------------------- int getCurrentColumn(string thisIdentifier) { // Return the index of the current column int returnValue = -1 int iCol = -1 Column c string thisDXL bool columnFound = false int l for c in current Module do { // Loop through columns iCol++ thisDXL = dxl(c) if (null thisDXL){continue} l = length(thisIdentifier) // Try '//Identifier' columnFound = thisDXL[2:l+1] == thisIdentifier if (!columnFound) { // Try '// Identifier' columnFound = thisDXL[3:l+2] == thisIdentifier } // Try '// Identifier' if (columnFound) { // Matching column found returnValue = iCol break } // Matching column found } // Loop through columns return returnValue } // Return the index of the current column // ----------------------------------------------------------------- Column getCurrentColumn(string thisIdentifier) { // Return a handel to the current column Column returnValue int n = getCurrentColumn(thisIdentifier) if (n >= 0){returnValue = column n} else {returnValue = null} return returnValue } // Return a handel to the current column
|
Re: Column number in DXL column's Peter_Albert - Fri Oct 01 03:51:09 EDT 2010
I have the nagging memory that I read somewhere in a related post that a "Column getCurrentColumn()" routine exists in DOORS 9.x, but I might be wrong here. // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title(c) ""}
. // Get a handle to the current column /* Layout DXL does not have a mechanism for getting e.g. the current column title. This subroutine can be used for getting a handle to the current column USAGE: The column must of course be a layoutDXL column. The first line of code must be a comment containing a user-defined unique identifier. The same identifier must be used as parameter in the call to Column getCurrentColumn(string thisIdentifier) EXAMPLE: // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title(c) ""} */ // ----------------------------------------------------------------- int getCurrentColumn(string thisIdentifier) { // Return the index of the current column int returnValue = -1 int iCol = -1 Column c string thisDXL bool columnFound = false int l for c in current Module do { // Loop through columns iCol++ thisDXL = dxl(c) if (null thisDXL){continue} l = length(thisIdentifier) // Try '//Identifier' columnFound = thisDXL[2:l+1] == thisIdentifier if (!columnFound) { // Try '// Identifier' columnFound = thisDXL[3:l+2] == thisIdentifier } // Try '// Identifier' if (columnFound) { // Matching column found returnValue = iCol break } // Matching column found } // Loop through columns return returnValue } // Return the index of the current column // ----------------------------------------------------------------- Column getCurrentColumn(string thisIdentifier) { // Return a handel to the current column Column returnValue int n = getCurrentColumn(thisIdentifier) if (n >= 0){returnValue = column n} else {returnValue = null} return returnValue } // Return a handel to the current column
Checking through DOORS 9.3 doors.exe I found the function "Column currentColumn", so slightly modifying you example works: Column col = currentColumn if (!null col){display title(col) ""} |
Re: Column number in DXL column's Peter_Albert - Fri Oct 01 03:51:09 EDT 2010
I have the nagging memory that I read somewhere in a related post that a "Column getCurrentColumn()" routine exists in DOORS 9.x, but I might be wrong here. // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title(c) ""}
. // Get a handle to the current column /* Layout DXL does not have a mechanism for getting e.g. the current column title. This subroutine can be used for getting a handle to the current column USAGE: The column must of course be a layoutDXL column. The first line of code must be a comment containing a user-defined unique identifier. The same identifier must be used as parameter in the call to Column getCurrentColumn(string thisIdentifier) EXAMPLE: // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title(c) ""} */ // ----------------------------------------------------------------- int getCurrentColumn(string thisIdentifier) { // Return the index of the current column int returnValue = -1 int iCol = -1 Column c string thisDXL bool columnFound = false int l for c in current Module do { // Loop through columns iCol++ thisDXL = dxl(c) if (null thisDXL){continue} l = length(thisIdentifier) // Try '//Identifier' columnFound = thisDXL[2:l+1] == thisIdentifier if (!columnFound) { // Try '// Identifier' columnFound = thisDXL[3:l+2] == thisIdentifier } // Try '// Identifier' if (columnFound) { // Matching column found returnValue = iCol break } // Matching column found } // Loop through columns return returnValue } // Return the index of the current column // ----------------------------------------------------------------- Column getCurrentColumn(string thisIdentifier) { // Return a handel to the current column Column returnValue int n = getCurrentColumn(thisIdentifier) if (n >= 0){returnValue = column n} else {returnValue = null} return returnValue } // Return a handel to the current column
Just a slight correction in the Layout DXL: // GetColumnExample #include <../layout/include/getCurrentColumn.inc> Column col = getCurrentColumn("GetColumnExample") if (!null col){display title( col ) ""} Kind regards, Axel |
Re: Column number in DXL column's SystemAdmin - Fri Oct 01 04:07:40 EDT 2010
Checking through DOORS 9.3 doors.exe I found the function "Column currentColumn", so slightly modifying you example works: Column col = currentColumn if (!null col){display title(col) ""} Kind regards, Axel |