This one is pretty simple so you should at least be able to give it a try with some guidance - The basic functions you will need are as follows:
defun
if
getpoint
getvar
open
progn
write-line
strcat
rtos
close
princ
I would first suggest reading the developer documentation for each of the above functions if you don't already know what they do.
The pseudo-code for the program (that is, the basic operations it needs to perform) would be something like:
- [color=blue]def[/color]i[color=blue]n[/color]e function [color=blue]if[/color] user [color=blue]get[/color]s [color=blue]point [/color] then [color=blue]if [/color]the target .scr file can be [color=blue]open[/color]ed for [color=darkred]w[/color]riting then [color=blue]progn[/color] [color=blue]write-line[/color] [color=darkred]"_.zoom"[/color] to file [color=blue]write-line[/color][color=darkred] "_C"[/color] to file [color=blue]write-line[/color] [[color=blue]strcat [/color][[color=blue]rtos [/color]x-coord] [[color=blue]rtos [/color]y-coord] [[color=blue]rtos [/color]z-coord]] to file [color=blue]write-line[/color] [[color=blue]rtos [/color][[color=blue]getvar [/color][color=darkred]viewsize[/color]]] to file [color=blue]close [/color]file else [color=blue]princ [/color]file could not be opened for writing [color=blue]princ[/color]
|