Jump to content

Recommended Posts

Posted

So I could not solve the issue, Anybody could help me with it please ?

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • Michaels

    10

  • Lee Mac

    8

  • pBe

    4

  • BlackBox

    3

Top Posters In This Topic

Posted
So I could not solve the issue, Anybody could help me with it please ?

 

So you want someone to do it for you?

 

(defun c:out ( / f e l )
 
 (if (and (setq f (open "D://atts.txt" "w"))
          (setq e (car (entsel "\nSelect Block: ")))
          (eq "INSERT" (cdr (assoc 0 (entget e))))
          (= 1 (cdr (assoc 66 (entget e))))
     )
   (progn
     (write-line (cdr (assoc 5 (entget e))) f)

     (while (not (eq "SEQEND" (cdr (assoc 0 (setq l (entget (setq e (entnext e))))))))
       (write-line (strcat (cdr (assoc 2 l)) "\t" (cdr (assoc 1 l))) f)
     )

     (close f)
   )
 )

 (princ)
)

 

*shrug*

Posted
As a quick modification of my previous code:

 

[b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] PadMiddle [b][color=RED]([/color][/b] s1 s2 ch ln [b][color=RED])[/color][/b]
[b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]<[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]+[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]strlen[/color][/b] s1[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]strlen[/color][/b] s2[b][color=RED]))[/color][/b] ln[b][color=RED])[/color][/b]
[b][color=RED]([/color][/b]PadMiddle [b][color=RED]([/color][/b][b][color=BLUE]strcat[/color][/b] s1 ch[b][color=RED])[/color][/b] s2 ch ln[b][color=RED])[/color][/b]
[b][color=RED]([/color][/b][b][color=BLUE]strcat[/color][/b] s1 s2[b][color=RED])[/color][/b]
[b][color=RED])[/color][/b]
[b][color=RED])[/color][/b]

 

wow :)

Wish i could do that... i'm getting there (trying to... :)) Lee

 

"Every day, in every way, I'm getting better and better"

Posted
wow :)

Wish i could do that... i'm getting there (trying to... :)) Lee

 

"Every day, in every way, I'm getting better and better"

 

Don't worry you will :) Its funny, once it clicks in your mind how it works, you do start to think about solving problems in a different way.

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