วันอาทิตย์ที่ 21 เมษายน พ.ศ. 2567

Split 2 blocks

Split 2 blocks


 

วันพฤหัสบดีที่ 11 เมษายน พ.ศ. 2567

How to develop branched cone

  How to develop branched cone












วันจันทร์ที่ 25 มีนาคม พ.ศ. 2567

How to setting Quick layout Multi size

How to setting Quick layout Multi size


ตามตัวอย่างจะมี Blocks A3 Landscape,A4 Landscape,A4 Portrail, scale 1:1 

1.เราจะทำการ Setting Page Setup Manager หน้า Layout1 โดยเลือกขนาดกระดาษ A3 Landscape Plot area เลือก Window window โดยเลือกตำแหน่ง Low Left ล่างซ้าย และ Top Right บนขวา และ Plot offset เลือก Center the plot และ Plot scale and Drawing Orentation กำหนดตามขนาดที่ต้องการ(ที่หน้า Layout ลบออกให้เหลือแค่ Layout1 เท่านั้น)

2.ใช้คำสั่ง Quick Layout เลือกขนาดกระดาษ A3 Landscape ที่ต้องการแล้ว Enter หน้า Viewport จะแสดงขึ้นมาเป็น 01 02 03 ตามลำดับ

3.ต่อไปก็เป็นกระดาษขนาด A4 Landscape ให้เราไปตั้งค่า Page Setup Manager ที่หน้า Layout1 ใหม่โดยเลือกขนาดกระดาษ A4 Landscape ตามข้อที่ 1 แล้วใช้คำสั่ง Quick Layout เลือกขนาดกระดาษ ตามข้อที่ 2 วนไปจนครบขนาดกระดาษที่เรามี


 

วันพุธที่ 20 มีนาคม พ.ศ. 2567

Change text attributes

CHange Text ATTributes 


 ;|

Edit width factor text height 

and rotation of attributes text

Create and Design by AutolispTH March 2024

|;

;;-----radial to dreegee

(defun rtod (x)

       (/ (* x 180) pi)

)

(defun dtor (x)

       (* x (/ pi 180))

)

(defun C:CHTAtt ( / e ent)

(vl-load-com)

(setq old_cmdecho  (getvar "cmdecho"))

(setvar "cmdecho" 0)

;-------------------width factor-----------------------------+

(or wd (setq wd 1.0))

 (setq wdtemp

        (getDist (strcat "\nEnter width factor of text: <"

                           (rtos wd 2 2)

                             ">: "

                ) 

        ) 

)

(and wdtemp (setq wd wdtemp))

;-------------------text height------------------------------+

(or th (setq th 1.0))

 (setq thtemp

        (getDist (strcat "\nEnter text height: <"

                           (rtos th 2 2)

                             ">: "

                ) 

        ) 

)

(and thtemp (setq th thtemp))

;--------------------text rotation---------------------------+

(or ro (setq ro 0.0))

 (setq rotemp

        (getDist (strcat "\nEnter text rotation: <"

                           (rtos ro 2 2)

                             ">: "

                ) 

        ) 

)

(and rotemp (setq ro rotemp))

;--------------------------------------------------------------+

(while (setq e (car (nentsel "\n Select an attribute to change:")))

(setq ent (vlax-ename->vla-object e))

(vla-put-scalefactor ent wd)

(vla-put-height ent th)

(vla-put-Rotation ent (dtor ro))

(princ)

)

(setvar "cmdecho" old_cmdecho)

(princ)

)

(prompt "\n\t\t\t  +------------------------------------------+\n")

(prompt "\n\t\t\t  |      Start with CHTATT to execute        |\n")

(prompt "\n\t\t\t  +------------------------------------------+\n")

วันพุธที่ 13 มีนาคม พ.ศ. 2567

Change Elv by attribute

 

;|

changes a blocks z coordinate to 

the elevation listed in attribute 

|;

(defun c:chbel()

(setq old_cmdecho  (getvar "cmdecho"))

(setvar "cmdecho" 0)

(setq SS (ssget '((0 . "INSERT")(66 . 1)))

  ucsf (getvar "ucsfollow")

)

(if (/= ss nil)

(progn

(setq ssl (sslength ss))

(setvar "ucsfollow" 0)

(if (/= 1 (getvar "worlducs"))(setq wucs 0)(setq wucs 1))

(command "ucs" "")

(setq numchg ssl

  n ssl

  newss (ssadd)

)

(while (> n 0)

(setq n (1- n)

  blk (ssname ss n)

)

(setq ent (vlax-ename->vla-object blk))

(setq atts (vla-getattributes ent))

(setq temp (vlax-variant-value atts))

(setq elem1 (vlax-safearray-get-element temp 0))

(setq el (atof (vla-get-textstring elem1)))

(command "CHANGE" blk "" "P" "E" el "")


);end while

(setq ssl (sslength newss)

  n ssl

)

(setq txt "blocks raised to elevation.")

(if (/= numchg 0)

(progn

(print numchg)

(princ txt)

)

(prompt "No blocks selected.")

)

)

(prompt "Empty selection set.")

)

(if (= 0 wucs)(command "ucs" "p"))

(setvar "ucsfollow" ucsf)

(setvar "cmdecho" old_cmdecho)

(princ)

);end defun

วันอังคารที่ 20 กุมภาพันธ์ พ.ศ. 2567

Quick Layout 2 By Blocks

Quick Layout 2 By Blocks


- ที่หน้า Layout1 สามารถตั้งค่า pagesetup ได้ตามต้องการเช่น Plotter Paper Size Plot Style Plot Area Plot Scale ต่างๆ ได้ตามต้องการโดยให้เป็นหน้ากระดาษเปล่าหรือใส่ Blocks หน้ากระดาษที่ต้องการก็ได้

- ส่วน Blocks ก็สร้างขนาดตาม Paper Size ที่กำหนดตามหน้า Layout1 โปรแรมจะทำการ copy หน้า Layout1 ไปเป็น 01 02 03 ...ไปเรื่อยๆจนครบหน้าที่ต้องการ


 

วันอาทิตย์ที่ 18 กุมภาพันธ์ พ.ศ. 2567

วันพฤหัสบดีที่ 8 กุมภาพันธ์ พ.ศ. 2567