비밀번호를 잊으셨나요?

비밀번호를 잊으셨나요? 비밀번호를 재설정하려면 이메일 주소를 입력해주세요.

계정이 있나요? 로그인

You must login to ask a question.

비밀번호를 잊으셨나요?

아직 계정이 없으신가요? 회원가입 하기

해당 질문을 신고하는 이유를 간단히 입력해주세요.

해당 답변을 신고하는 이유를 간단히 입력해주세요.

해당 유저를 신고하는 이유를 간단히 입력해주세요.

로그인회원가입

고캐드 – 캐드(CAD) 정보의 중심

고캐드 – 캐드(CAD) 정보의 중심 Logo 고캐드 – 캐드(CAD) 정보의 중심 Logo

고캐드 – 캐드(CAD) 정보의 중심 Navigation

  • Q&A
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 커뮤니티
    • 오늘의이슈
    • 자유게시판
    • 익명게시판
    • 건의게시판
  • 자료실
    • 자료요청
    • 일반파일
    • 도면샘플
    • 유틸리티
    • 기타
  • 작품 갤러리
    • 그래픽
    • 캐드도면
    • 3D모델
    • 기타
  • 뉴스&이벤트
    • 공지사항
    • 뉴스
    • 전시/행사
    • 이벤트
    • 기타
검색
질문하기

Mobile menu

닫기
질문하기
  • 홈
  • 카테고리
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 투표
  • 커뮤니티 그룹
  • Q&A
    • AutoCAD & CADian
    • Inventor & Solidworks
    • Revit & ArchiCAD
    • 자유질문
    • 기타
  • 커뮤니티
    • 오늘의이슈
    • 자유게시판
    • 익명게시판
    • 건의게시판
  • 자료실
    • 자료요청
    • 일반파일
    • 도면샘플
    • 유틸리티
    • 기타
  • 작품 갤러리
    • 그래픽
    • 캐드도면
    • 3D모델
    • 기타
  • 뉴스&이벤트
    • 공지사항
    • 뉴스
    • 전시/행사
    • 이벤트
    • 기타
홈/ 질문/Q 102699
다음
진행 중
Lv.0
등록일: 2014-11-192014-11-19T17:20:47+09:00 2014-11-19T17:20:47+09:00카테고리: AutoCAD & CADian

사칙연산 리습 질문드립니다.

;;program name : 캐드내 사칙연산프로그램 ver 1.1
;;date:2000.06.09
;;program by:kang o nam
;;ID : 하이텔ID(anold88)
;;E-MAIL : anold88@hitel.net
;;         anold88@hanmail.net


(defun exe()
   (setvar “cmdecho” 0)
   (setvar “blipmode” 0)
   (setq cl (getvar “clayer”))
   (setq e1 (entsel “n>>첫번째숫자선택:”))
   (setq a (car e1);;———-엔티티의 이름값
         b (entget a);;——–엔티티의 리스트값
         txt1 (assoc 1 b);;—-엔티티중 해당 문자열 리스트
         tt1 (cdr txt1);;——엔티티 문자열의 리스트중 뒤의값=”문자열”
         sum1 (atof tt1);;—–엔티티의 문자열을 정수로 변환=100
         txth1 (assoc 40 b);;–엔티티 리스트중 텍스트 높이의 리스트값(40,100)
         thh (cdr txth1);;—–엔티티의 텍스트높이의 리스트중 뒤의값=100
   )         
   (setq e2 (entsel “n>>두번째숫자선택:”))
   (setq aa (car e2)
         bb (entget aa)
         txt2 (assoc 1 bb)
         tt2 (cdr txt2)
         sum2 (atof tt2)
         )
    (setq tl (assoc 8 b)
          txtst (cdr tl)
    )
)
 (defun exe+()
    (setq sum (+ sum1 sum2))
    (setq summ (rtos sum 2 4))
    (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)  
 )
 (defun exe-()
    (setq sum (- sum1 sum2))
    (setq summ (rtos sum 2 4))
    (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!   
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)  
 )
 (defun exe*()
    (setq sum (* sum1 sum2))
    (setq summ (rtos sum 2 4))
    (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)  
 )
 (defun exe/()
    (setq sum (/ sum1 sum2))
    (setq summ (rtos sum 2 4))
    (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!   
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)  
 )
 (defun exe%()
    (setq sum (* (/ sum1 sum2) 100))
    (setq summ (rtos sum 2 4))
    (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)  
 )
(defun c:0( / cl e1 a b txt1 tt1 sum1 txth1 thh e2 aa bb txt2 tt2 sum2 tl txtst sum summ p1)
  (exe)
  (exe+)
  (princ)
)
(defun c:-( / cl e1 a b txt1 tt1 sum1 txth1 thh e2 aa bb txt2 tt2 sum2 tl txtst sum summ p1)
   (exe)
   (exe-)
   (princ)
)
(defun c:/( / cl e1 a b txt1 tt1 sum1 txth1 thh e2 aa bb txt2 tt2 sum2 tl txtst sum summ p1)
  (exe)
  (exe/)
  (princ)
)
(defun c:%( / cl e1 a b txt1 tt1 sum1 txth1 thh e2 aa bb txt2 tt2 sum2 tl txtst sum summ p1)
  (exe)
  (exe%)
  (princ)
)
(defun c:py( / cl e1 a b txt1 tt1 sum1 txth1 thh sum summ p1 )
   (setvar “cmdecho” 0)
   (setvar “blipmode” 0)
   (setq cl (getvar “clayer”))
   (setq e1 (entsel “n>>숫자선택:”))
   (setq a (car e1);;———-엔티티의 이름값
         b (entget a);;——–엔티티의 리스트값
         txt1 (assoc 1 b);;—-엔티티중 해당 문자열 리스트
         tt1 (cdr txt1);;——엔티티 문자열의 리스트중 뒤의값=”문자열”
         sum1 (atof tt1);;—–엔티티의 문자열을 정수로 변환=100
         txth1 (assoc 40 b);;–엔티티 리스트중 텍스트 높이의 리스트값(40,100)
         thh (cdr txth1);;—–엔티티의 텍스트높이의 리스트중 뒤의값=100
   )
    (setq sum (* sum1 0.3025))
    (setq summ (rtos sum 2 2))
    (setq zz (strcat “(” summ “)”))
    (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!
    (command “text” p1 thh 0 zz)
    (command “layer” “s” cl “”)  
(princ)
)
(defun c:+( / cl sum_m ss ok e ent sum_ p1 txth1 thh summ )
 (setvar “cmdecho” 0)
 (setvar “blipmode” 0)
 (setq cl (getvar “clayer”))
 (setq sum_m 0)
  (setq SS (ssget))
  (setq ok 0)
  (while
    (setq e (ssname ss ok))
    (setq ent (entget e))
    (setq sum_ (assoc 1 ent))
    (setq sum_ (cdr sum_))
    (setq sum_ (atof sum_))
    (setq sum_m (+ sum_m sum_))
    (setq ok (1+ ok))
  )
 (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!   
    (setq txth1 (assoc 40 ent))
    (setq thh (cdr txth1))
    (setq summ (rtos sum_m 2 4))
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)   
(princ)      
)
(defun c:*( / cl sum_m ss ok e ent sum_ p1 txth1 thh summ )
 (setvar “cmdecho” 0)
 (setvar “blipmode” 0)
 (setq cl (getvar “clayer”))
 (setq sum_m 1)
  (setq SS (ssget))
  (setq ok 0)
  (while
    (setq e (ssname ss ok))
    (setq ent (entget e))
    (setq sum_ (assoc 1 ent))
    (setq sum_ (cdr sum_))
    (setq sum_ (atof sum_))
    (setq sum_m (* sum_m sum_))
    (setq ok (1+ ok))
  )
 (setq p1 (getpoint “n>>표시할 포인트찍기:”))
;;    (command “layer” “s” “tex” “” “”);;—————->> 사용자 선택레이어조정란!!  
    (setq txth1 (assoc 40 ent))
    (setq thh (cdr txth1))
    (setq summ (rtos sum_m 2 4))
    (command “text” p1 thh 0 summ)
    (command “layer” “s” cl “”)   
(princ)      
)
(princ “n>>사칙연산 프로그램 로딩완료 command : 0,-,1,/,%,py,00,11”)
(princ)

사칙연산 리습입니다…  면적: 2100(글씨가 써 일경우) 사칙연산 가능하게 할수있나요? 
aaaaadd

  • 0
  • 2 2 답변
  • 41 조회
공유
  • Facebook

    관련 있는 질문들

    • 질문오토캐드 라인타입이 너무 많은데 어떻게 정리하나요..
    • 질문오토캐드 라인타입이 너무 많은데 어떻게 정리하나요..
    • 캐드출력시 pc3모드이 이상현상
    • 객체 전체 간격 조정 할수 있을까요?

    2 답변

    • 작성 순
    • 최신 순
    • 공감 순
    1. aalan
    2. 수야12 Lv.21
      2014-11-19T18:28:01+09:00답변 등록 답변 등록 일시 2014-11-19 6:28 pm

      분명 아름다운 우리글로 써있는 내용인데 내용을 알아 볼수가 없네요 ^^;; 
      선택한 텍스트에  숫자와 문자혼합일때도 계산가능하게 해달라는 얘기로 생각하고 수정

      했습니다 
      사용예 > test200 (가능) 200test(가능) 2te3s10(결과값 보장못함)
      • 0
      • 공유
        공유
        • 공유 Facebook
        • 공유 Twitter
    3. [Deleted User]
      2014-11-20T17:07:46+09:00답변 등록 답변 등록 일시 2014-11-20 5:07 pm

      감사합니다~유용하게 사용하겠습니다.

      • 0
      • 공유
        공유
        • 공유 Facebook
        • 공유 Twitter

    Sidebar

    질문하기
    공지사항

    • AI CAD의 미래! 캐디안 2025 1+1 프로모션 안내 2025-05-14

    Adv 234x60

    aalan

    Adv 234x60

    aalan

    Adv 120x600

    aalan

    Explore

    • 홈
    • 카테고리
      • AutoCAD & CADian
      • Inventor & Solidworks
      • Revit & ArchiCAD
      • 자유질문
      • 기타
    • 투표
    • 커뮤니티 그룹
    aalan

    Footer

    Support

    • 회사 및 서비스 소개
    • 자주 묻는 질문
    • 문의하기

    Guide

    • 제휴/협업 안내
    • 광고 서비스 안내

    Policy

    • 서비스 이용약관
    • 개인정보 처리방침
    • 광고성 정보 수신 동의

    Contents

    • 고밍스토리
    • 리습 시리즈

    정소프트 | 사업자등록번호 : 677-40-00198 | 대표 : 정은숙 | 이메일 : gocad.manager@gmail.com
    주소 : 서울특별시 강서구 양천로 400-12, 6층 614,615,617호(등촌동, 더리브골드타워)
    Copyright. 2012-2024 GOCAD All rights reserved