- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey VLisp Folks,
I'm glad to write my first post in this forum.
I started to learn VLisp about 2 weeks ago to execute (as I thought) a simple routine.
I want to create an array of squares filled with hatching that have subsequent RGB color values.
So first square is filled with (R:0 G:0 B:0), second (R:0 G:0 B:1), third (R:0 G:0 B:2) ... last (R:0 G:0 B:255).
I want to start with this simple task in order to create a larger color gradient.
The reason for that task is that we are always having a trouble to print correct colors on our company plotter.
I want to create a sample plot for everyone in my office to match screen colors with plotter colors easier.
So far I wrote the piece of code below, but the last line of code (setting color property to the last created object) is not working.
Please, let me know where are my bugs. Also, I'd be glad to get some reasonable advices as for a beginner into VLisp.
I'm not looking for an advanced solution, that I'll perhaps do not understand. I just want someone to guide me a little bit. Thanks for understanding!
(defun c:RGB_Array () (setq repetition (getint "\nNumber of repetitions: ")) (setq count 0) (setq basepoint (list 0 0)) (setq dist 100) (while (< count repetition) (setq count (1+ count)) (setq basepoint (list dist 0)) (setq curcol count) (setq current_object (entlast)) (command "copy" current_object "" "" basepoint (list dist 0)) (setpropertyvalue current_object "color" 0 0 curcol) ) )
So this piece of code is creating an array but does not change the color of the object.
Cheers,
Krzysztof
Solved! Go to Solution.