Jump to content

numbering the object


nad

Recommended Posts

Which is why I hypothesized that if the text were to be placed with Middle Centre justification at the centre point of the circle, then you could just do the Data Extraction on the Text, whose insertion point would be the centre of the circle. The Data Extraction on the circles themselves would be superfluous.

Link to comment
Share on other sites

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    11

  • nad

    6

  • eldon

    5

  • BIGAL

    3

Top Posters In This Topic

Posted Images

Watch this space testing something at the moment this needs debugging

 

; circlelay is the layer name the circles are drawn on
; circnum is number of circel
; circblock is a layer that the new blocks go on to
;(setq fname "c:\temp\test")
 ; (setq f (open fname "w"))
(setq circnum (getint "\nEnter circle start number "))
;(setvar "clayer" "circblock")
(setq ss2  (ssget "x" '((0 . "circle")(8 . "0"))))
(setq index 0)
(setq n (sslength ss2))
  (repeat n
     (setq en (ssname ss2 index))
     (setq el (entget en)) 
     (setq ip (cdr (assoc 10 el)))
  (command "._insert" "circlable" ip 1 1 0 circnum)
  (setq index (+ index 1))
; you can delete the circle entitie if you want here
    (setq circnum (+ circnum 1))
     (setq att (rtos circnum 2 0)
     (setq px (rtos (car ip) 2 3))
     (setq py (rtos (cadr ip) 2 3))
     (setq pz (rtos (caddr ip) 2 3))
     (setq pnt (strcat att "," px ", " py ", " pz))
(princ pnt)
   ;  (write-line pnt f)
) ; end repeat
  ;Close file
  (CLOSE f)
  
  (PRIN1)

Link to comment
Share on other sites

Remark I understand just looking at a generic routine for any object to be replaced by a block then text can be anywhere the user wants far easier than trying to tye text to a circle just move one text doesn't work. But it replaces a circle and lables and writes a csv file.

 

(setq ss2  (ssget "x" '((0 . "circle")(8 . "0"))))
becomes
(setq ss2  (ssget "x" '((0 . "circle")(8 . "STONE COLUMNS"))))

 

almost there will add extra features like find last number used.

 

; circlelay is the layer name the circles are drawn on
; circnum is number of circel
; circblock is a layer that the new blocks go on to
(setq fname "c:\\temp\\test.csv")
(setq f (open fname "w"))
(setq circnum (getint "\nEnter circle start number "))
;(setvar "clayer" "circblock")
(setq ss2  (ssget "x" '((0 . "circle")(8 . "STONES COLUMN"))))
(setq index 0)
(setq n (sslength ss2))
  (repeat n
 (setq en (ssname ss2 index))
 (setq el (entget en)) 
 (setq ip (cdr (assoc 10 el)))
 (command "insert" "circlable" ip 1 1 0 circnum)
 ; you can delete the circle entitie if you want here
  (setq att (rtos circnum 2 0))
  (setq px (rtos (car ip) 2 3))
  (setq py (rtos (cadr ip) 2 3))
  ; (setq pz (rtos (caddr ip) 2 3))
  (setq pnt (strcat att "," px ", " py ))
  (princ pnt)
 (setq index (+ index 1))
 (setq circnum (+ circnum 1))
 (write-line pnt f)
) ; end repeat
  ;Close file
  (CLOSE f)
  
  (PRIN1)

Edited by BIGAL
Link to comment
Share on other sites

I just had a look at the drawing posted by the OP, and because all the numbers seem to be placed at the same distance from the centre of the circle, it is but the work of a few seconds to change the Justification to Middle Centre, and move them all to the centre of their circles. Now Data Extraction on the Text will work perfectly to do what the OP is wanting :D

Link to comment
Share on other sites

yes it is one of the technique for soil improvement,

If u like shift the numbers inside circles and reply with appropriate lisp please

 

Try Lee Mac's numbers included! Lee's always got something for everyone! 8)

NumIncV3-1.lsp

Link to comment
Share on other sites

  • 2 weeks later...

Dear all, the numbers could be shifted to the center of the circles "stone Column" , still how can I get coordinates of circles including numbers in excel 2007 sheet

that is my object basically.

Thanks, as I am really learning here a lot.

Link to comment
Share on other sites

I just had a look at the drawing posted by the OP, and because all the numbers seem to be placed at the same distance from the centre of the circle, it is but the work of a few seconds to change the Justification to Middle Centre, and move them all to the centre of their circles. Now Data Extraction on the Text will work perfectly to do what the OP is wanting :D

 

Dear all, the numbers could be shifted to the center of the circles "stone Column" , still how can I get coordinates of circles including numbers in excel 2007 sheet

that is my object basically.

Thanks, as I am really learning here a lot.

 

Read eldon's post above. Search CADTutor or Google for Dataextraction from AutoCAD.

Link to comment
Share on other sites

well, what almost no one is saying....if you want to get the data organized like you're describing then you will need to either:

 

1. Be an ace LISP programmer who could parse all the fields from a Data Extraction process to associate points with the numbered circles.

 

2. Or have one of the ace LISP programmers here in this forum feel challenged enough to do it for you.

 

IMHO - what the OP is asking for is a complicated process of associating bits of information which are scattered around the drawing. No real mathematical way to parse it will work. Not saying it couldn't be done, just that it's a very big challenge to pull off such a task. Hindsight is 20-20 and of course the best way to have done this would have been to have the points in a database first and then import them into AutoCAD. You could sort, resort, and place them in any order you want, but once you place them in AutoCAD the points become locked to their identities within the AutoCAD database.

 

That said, you could go back and carefully re-enter all the points and you'd have to do it in the order you want them to appear in. Then when you do a selection of all these points you could dump them to a file and simply number them. I know nothing I've proposed is easy, but that's what your options look like from my point of view.

Link to comment
Share on other sites

IMHO - what the OP is asking for is a complicated process of associating bits of information which are scattered around the drawing.

 

Did you actually look at the posted drawing?

 

There is no scattering. All the texts were at a constant distance from the centre of their circle - or did you see different :?

 

Data extraction will do exactly what the OP requires, when the text is moved as I said in a previous post.

 

I fear that you are muddying the waters :unsure:

Link to comment
Share on other sites

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...