프로젝트

일반

사용자정보

개정판 a349c49c

IDa349c49c56e7b968b0cd52471a69c9c705dd2741
상위 3130fc0a
하위 6547db9c

함의성이(가) 약 2년 전에 추가함

fix cad

Change-Id: I2ac470f15ee655d54430d5be4d6d494130a4f95b

차이점 보기:

DTI_PID/DTI_PID/ImportTextFromCADDialog.py
716 716
                        )
717 717

  
718 718
                        stdout, stderr = p.communicate()
719
                        if len(stderr) != 0 or 'eFileSharingViolation' in str(stdout):
719
                        if len(stderr) != 0 or ('eFileSharingViolation' in str(stdout) or 300 > len(stdout)):
720 720
                            #raise RuntimeError('OdReadExMgd threw error:\n' + stderr.decode('utf-8'))
721 721
                            raise RuntimeError('OdReadExMgd threw error:\n' + str(stderr)) if len(stderr) != 0 else \
722 722
                                RuntimeError('OdReadExMgd threw error:\n' + str(stdout))
......
863 863
            id2_image_file = os.path.join(drawing_path, file_name + '.png')
864 864
            autocad_xml_path = os.path.join(os.path.dirname(_file), os.path.splitext(os.path.basename(_file))[0] + '.xml')
865 865
            matches = [id2_xml_file for id2_xml_file in id2_xml_files if id2_xml_file.replace(file_name, '').upper() == '.XML']
866

  
867
            if not matches:
868
                path = os.path.join(app_doc_data.getCurrentProject().getTempPath(), file_name + '.xml')
869
                img = AppDocData.my_imread(file_path=id2_image_file)
870
                _width = img.shape[1]
871
                _height = img.shape[0]
872
                xml, result = xg.write_to_xml(path, _width, _height, [], [])
873
                if xml:
874
                    from xml.etree import ElementTree
875
                    ElementTree.ElementTree(xml).write(path)
876
                    matches = [file_name + '.xml']
877
        
866 878
            if matches and os.path.exists(id2_image_file):
867 879
                try:
868 880
                    symbols = {}

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)