Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
stevesfr
Posts: 69
Registered: ‎03-21-2009
Message 1 of 3 (108 Views)

How to move text with (write-line .... ?

108 Views, 2 Replies
03-28-2009 11:33 AM
In part of the lisp below, how can I move "dwgname" over to the right when the write-line is written to the text file?
Yes there is more to this lisp, and it all works fine, except I would like to move "dwgname" over from the extreme left justification.
Thx for looking.
Steveo

[code](setq A (vl-filename-base(getvar "dwgname")))


(write-line A f1)[/code]
Valued Mentor
Ian_Bryant
Posts: 362
Registered: ‎06-02-2005
Message 2 of 3 (108 Views)

Re: How to move text with (write-line .... ?

03-30-2009 01:22 AM in reply to: stevesfr
Hi,
(write-line (strcat "\T" A) f1)
will move it by tab spacing.
(write-line (strcat " " A) f1)
moves it by how long " " is.
Regards Ian
Valued Contributor
stevesfr
Posts: 69
Registered: ‎03-21-2009
Message 3 of 3 (108 Views)

Re: How to move text with (write-line .... ?

03-30-2009 04:22 AM in reply to: stevesfr
Thanks, one short line of code solves the problem !
Steve
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.