Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
At the PM2024, How can I get the selected surface colour rgb values?
Can use a macro to do that?
Solved! Go to Solution.
At the PM2024, How can I get the selected surface colour rgb values?
Can use a macro to do that?
Solved! Go to Solution.
try this:
GRAPHICS LOCK
DIALOGS MESSAGE ON
SIZE MODEL
STRING LIST $tempContent = tokens(widget('TextInfo.InfoText').value)
TEXTINFO close
DIALOGS MESSAGE ON
DIALOGS ERROR On
int $len = size($tempContent)
string $rgb = 'R:' + trim($tempContent[$len-4]) + ' G:' + trim($tempContent[$len-3]) + ' B:' + trim($tempContent[$len-2])
message info $rgb
heres an alternative version:
string $temp = "C:\temp\surfaceColor.tmp"
DELETE FILE $temp
GRAPHICS LOCK
DIALOGS MESSAGE OFF
ECHO OFF DCPDEBUG UNTRACE COMMAND ACCEPT
TRACEFILE OPEN $temp
SIZE MODEL
TRACEFILE CLOSE
DIALOGS MESSAGE ON
DIALOGS ERROR On
STRING LIST $tempContent = {}
FILE OPEN $temp FOR READ AS Input
FILE READ $tempContent FROM Input
FILE CLOSE Input
string list $items = tokens($tempContent[size($tempContent)-1])
int $len = size($items)
string $rgb = 'R: ' + $items[$len-4] + ' G: ' + $items[$len-3] + ' B: ' + $items[$len-2]
message info $rgb