기본 콘텐츠로 건너뛰기

라벨이 Cell인 게시물 표시

extract cell name from cell library

#include #include #include #include "w2Dgn.h" #include #include externvoidloadCellLibraryIfNeeded(char*libToLoad); /*----------------------------------------------------------------------+ | | | name GetCellNameFromCellLib | | | | author HumKyung.Baek | | | +----------------------------------------------------------------------*/ Public intGetCellNameFromCellLib(char* pOutputTextFilePath , char* pstrCellLib) { ULong elemAddr[250], eofPos, filePos, actualPos, readPos; intscanWords, status, i,j=0, numAddr, fileNum=CELL_LIB, offset; charcellName[10], cellDescription[30], msg[132]; Scanlist scanList; MSElement cellElm; /*cell element descriptor */ FILE* fp = NULL; if(fp = mdlTextFile_open(pOutputTextFilePath , TEXTFILE_WRITE)) { loadCellLibraryIfNeeded(pstrCellLib); mdlScan_initScanlist (&scanList); mdlScan_noRangeCheck (&scanList); scanList.scantype = ELEMTYPE | NESTCELL; ...

Cell 삽입하기

CELL을 입력하기 위해서는 아래의 루틴을 따르면 됩니다. CELL이 들어 있는 Cell Library 파일을 Attach 시킵니다.(이미 Attach되어 있으면 다시 Attach 시킬 필요가 없습니다.) Cell Library에서 삽입할 Cell을 Cell 이름을 통해서 구해와 삽입합니다. 간단하죠.... 그럼 아래 제가 사용한 코드를 보도록 하겠습니다... /* ANSI C includes */ #include stdlib.h> #include stdio.h> #include string.h> #include assert.h> /* MDL H includes */ #include mdl.h> #include cmdlist.h> #include dlogids.h> #include dlogitem.h> #include mdlerrs.h> /* MDL FDF includes */ #include ditemlib.fdf> #include dlogman.fdf> #include mscexpr.fdf> #include mscnv.fdf> #include msdialog.fdf> #include msoutput.fdf> #include msrsrc.fdf> #include msstate.fdf> #include mssystem.fdf> #include mdllib.fdf> #include msmline.fdf> #include tcb.h> /*----------------------------------------------------------------------+ | | | name loadCellLibraryIfNeeded | | | | author BSI 6/91 | | | +----------------------------------------------------------------------*/ Private voi...