Command
QisLib_AddPath Function: int QisLib_AddPath(const CQisPath* PathStruct, CVectHandle* HandlePtr); Inputs: PathStruct: Data cell containing information of the path to be added. HandlePtr: Pointer to an object to get the handle of the newly added path when the function returns. Return: success: 0 failure: value < 0 indicating one of the following errors. Errors: -1: QisLib has not been initialized. -2: The specified input is invalid (null). -3: The GDSII/OASIS file is not loaded in memory. -4: Internal memory failure while adding path. -5: The specified cell does not exist. -6: One or more input data is invalid. -7: File open in progress, operation not permitted. Description: - This function adds a path to a cell. - If QisLib_SetAddVectorHandle is on, QisLib_AddPath returns a handle to the newly added path on successful completion via HandlePtr. This handle can be used to edit(delete) the path. - This function call is usually preceded by calls to QisLib_AddStructure and QisLib_AddLayer. - The file to which the path is to be added must be opened in edit mode either by opening it with QisLib_SetLoadMemory on or by creating a new file using QisLib_NewGDSII or QisLib_NewOASIS. - Adding data outside the extents of the cell might affect the extents of the cell or the cell's parents and grandparents. - These extents are not recomputed until QisLib_OpenStructure is called. - Once the extents are computed, they will not shrink back even if the polygon is deleted. - If the extents of a cell have not been recomputed by a call to QisLib_OpenStructure, polygons added outside the extents might not be drawn under certain conditions. - It is possible to add path to a cell currently not opened for viewing. Code Snippet: CQisPath PathRec; PathRec.StructName = ... PathRec.Layer = ... PathRec.DataType = ... PathRec.NumVert = ... PathRec.Type = ... if(GetVectorUnit() == _QISUNIT_DBU) { PathRec.Width.DBUnits = ... PathRec.XYCoords.DBUnits = SomeArrayOfInt(); for(i=0; i < PathRec.NumVert*2; i++) { PathRec.XYCoords.DBUnits[i] = ... } } else { PathRec.Width.UserUnits = ... PathRec.XYCoords.UserUnits = SomeArrayOfDouble(); for(i=0; i < PathRec.NumVert*2; i++) { PathRec.XYCoords.UserUnits[i] = ... } } ... CVectHandle NewHandle; ... int Return = QisLib_AddPath(&PathRec, &NewHandle); switch(Return) { ... }References: QisLib_AddStructure QisLib_SetAddVectorHandle QisLib_AddAddLayer QisLib_DeleteVector QisLib_SetLoadMemory QisLib_UndeleteVector CQisPath CVectHandle |