CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > CoCreate Modeling Personal Edition

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-22-2010, 07:00 AM
tbombardo tbombardo is offline
Registered User
 
Join Date: Sep 2010
Posts: 71
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
Reply With Quote
  #2  
Old 10-22-2010, 07:14 AM
tbombardo tbombardo is offline
Registered User
 
Join Date: Sep 2010
Posts: 71
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?
Reply With Quote
  #3  
Old 10-22-2010, 09:50 AM
BMaverick's Avatar
BMaverick BMaverick is offline
Registered User
 
Join Date: Mar 2009
Location: Tennessee, U.S.A.
Posts: 267
Re: part color

Quote:
Originally Posted by tbombardo View Post
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?
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
Reply With Quote
  #4  
Old 11-20-2010, 09:41 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: part color

Quote:
Originally Posted by tbombardo View Post
is there a way to make each new part you create be a diffferent random color?
not during creation itself.. but may be this helps you a lot:
http://osd.cad.de/lisp_3d.en.htm#08
Reply With Quote
  #5  
Old 09-22-2011, 10:02 PM
rickythomas rickythomas is offline
Banned
 
Join Date: Jun 2011
Posts: 18
Re: part color

I have the similar query about the Grey color background over the sheet, help me out to resolve it.
Reply With Quote
  #6  
Old 09-24-2011, 01:11 PM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: part color

Quote:
Originally Posted by rickythomas View Post
Grey color background over the sheet
info is not specific enough (for me) to give some help...
Reply With Quote
  #7  
Old 03-16-2013, 01:08 AM
hman hman is offline
Registered User
 
Join Date: Mar 2013
Posts: 4
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
Reply With Quote
  #8  
Old 03-16-2013, 08:30 AM
Friedly's Avatar
Friedly Friedly is offline
Registered User
 
Join Date: May 2012
Location: Belgium
Posts: 76
Smile Re: part color

Hi John,
try this

Quote:
(progn (ELAN::SET_PART_COLOR (OLI::SD-INQ-CURR-PART) :RGB (FRAME2::GPNT3D (LISP::RANDOM 1.0) (LISP::RANDOM 1.0) (LISP::RANDOM 1.0)) DONE) (update_screen))
I found it on
http://osd.cad.de/lisp_3d_08.htm
"Nur ein Teil zufällig einfärben"
and should work

Quote:
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)
You had better taken the code from Andy Poulsen
Was in the same thread

Best regards Friedly

Last edited by Friedly; 03-16-2013 at 08:35 AM.
Reply With Quote
  #9  
Old 03-16-2013, 06:43 PM
hman hman is offline
Registered User
 
Join Date: Mar 2013
Posts: 4
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:07 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.