Jump to content

How can make LINE and Circle from text file


Recommended Posts

Posted

Hi friends

I want to draw LINE and CIRCLE with different layer and color from text file anybody can help me? thx

Posted

thx jonathann3891

I have text file like this :

Column

0,0

0,20

500,20

Column

0,20

30,40

100,30

BEAM

20,20

50,20

 

I want seperat Column and Beam to draw them.i try this but not worked.

 

(defun c:Soole( / fn fp lst l p1 p2 oldOSM )

(command "_.-layer" "_N" "Column" "_M" "CCC_LAYOUT_Cross_Sections_Outline" "_C" "150" "CCC_LAYOUT_Cross_Sections_Outline" "" )


 (setq fn (getfiled "Select ASCII file" "" "txt" 4))
 (setq fp (open fn "r") lst '())
 (while 
(if (/= item "COLUMN")
   
   (setq l (read-line fp))
   (setq lst (cons l lst))
 ))

 (close fp)
 (setq lst (reverse lst))
 (setq oldOSM (getvar "osmode"))
 (setvar "osmode" 0)

 (command "._pline" "")
 (foreach item lst
  (if (/= item "COLUMN")
   (command item)
   (command "" "._pline")
    
 ))
 (command "")

(setvar "osmode" oldOSM)
(princ)
)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...