#1
|
|||
|
|||
part color
Is there a reason all my parts are gray? Is the feature where they are different colors something you only get in the paid version or something or am I just missing something? Can't seem to find an option to change colors anywhere
|
#2
|
|||
|
|||
Re: part color
sorry, never mind, I figured it out. Follow-up question though is , is there a way to make each new part you create be a diffferent random color?
|
#3
|
||||
|
||||
Re: part color
Yes, you will need to do a search in the fourm here from about three months back for a LISP program that can be run. I'm only going by memory abuot this ...
__________________
Support Your Local Sheriff - At high noon Jason: "How much does it pay?" Citizen: "Well, none of our other sheriffs ever lived long enough to find out." Co-Create 2007 (15.50G) ANSYS Workbench 14 SolidWorks 2011 UGNX-7.5 / TeamCenter UA 8 PADS 2000 Applicon Bravo Autotrol CADAM Pro/E |
#4
|
||||
|
||||
Re: part color
Quote:
http://osd.cad.de/lisp_3d.en.htm#08
__________________
|
#5
|
|||
|
|||
Re: part color
I have the similar query about the Grey color background over the sheet, help me out to resolve it.
|
#6
|
||||
|
||||
Re: part color
info is not specific enough (for me) to give some help...
__________________
|
#7
|
|||
|
|||
Re: part color
I've been wanting to get this function to work on Personal Edition 3.0 for a while. Had a similar function (written by Louis Barinaga) that worked nicely “way-back-when,” while I was at HP in Corvallis (retired in 2005).
I've tried the code that Wolfgang posted on 01-16-2008 in the "Lisp tool for coloring ALMOST perfect" thread (Customization forum, page 9), as well as Louis Barinaga's old code. Wolfgang's code: (in-package :my-tools) (use-package :oli) (progn (SET_PART_COLOR (SD-INQ-CURR-PART) :RGB (GPNT3D (RANDOM 1.0) (RANDOM 1.0) (RANDOM 1.0)) :DONE) (update_screen)) Barinaga's code: (in-package :NewTricks) (use-package '(:oli)) (sd-defdialog 'ColorCurPart :dialog-control :sequential :toolbox-button 't :ok-action '(progn (setf color (sd-inq-default-part-color)) (setf (gpnt3d_x color) (+ 0.3 (random 0.6)) ) (setf (gpnt3d_y color) (+ 0.3 (random 0.6))) (setf (gpnt3d_z color) (+ 0.3 (random 0.6))) (sd-call-cmds (set_part_inst_color :parts (sd-inq-curr-part) :color :rgb color)))) The way I implemented them was to simply cut-and-paste the code into the command line. Then, in the case of Barinaga's code, I gave the ColorCurPart command. Results: Both of these do change the color of the active part -BUT- No matter what I try, as soon as I click anywhere in the work area, I get: LISP error: The function GPNTWC is undefined. In addition, if I try to save or load a file, I get: LISP error: The function SHOW-FILE-BROWSER is undefined. Interestingly enough, and maybe helpful for diagnostic purposes, the prompt line (at least in the Barinaga case) changes to "NewTricks [whatever would normally be expected]" Can anybody offer any suggestions as to what's going wrong, and how to fix it? Many thanks! - John Herrmann Last edited by hman; 03-16-2013 at 02:46 AM. Reason: forgot to disable smileys |
#8
|
||||
|
||||
Re: part color
Hi John,
try this Quote:
http://osd.cad.de/lisp_3d_08.htm "Nur ein Teil zufällig einfärben" and should work Quote:
Was in the same thread Best regards Friedly Last edited by Friedly; 03-16-2013 at 08:35 AM. |
#9
|
|||
|
|||
Re: part color
Thanks, Friedly.
I think I figured the main problem out. It was the inclusion of the in-package statement. I tried deleting that, and the GPNTWC undefined and similar problems went away. Then it was just a matter of entering the code (from *any* of the sources, including Andy Poulsen's that you quoted) into one of the tools - customize - definition screens. I finally have it working, using ctrl-R to give a random color to the current part. It's still a bit clunky, possibly due to the "progn" and abbreviation definition names "not liking each other." I'm not, unfortunately a Lisp programmer - more of a monkey-see-monkey-do coder, as you can probably guess from my odd nomenclature, but I somehow got this one to work "with a little help from my friends". ...and to think I used to be a "local expert" (in my work group) on Solid Designer while I was at HP... Of course, in those days I had guys like Louis Barinaga, Brad Tallis, Rob Midtun, and Jeff Munsey just a short walk or a phone call away. Ah, well ... - John Herrmann |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|