Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
The Hamma

Compare Fill Fore color

Recommended Posts

This is not working and I have no idea why, any help would be appreciated.

Procedure linecolor;

Var

cw: longint;

r,g,b: LONGINT;

h: handle;

BEGIN

GetFillFore(h, r,g,b);

if r,g,b =(0,0,255) then SetFillFore(h :255,255,255);

End;

Run (linecolor);

Share this post


Link to post

Another thing to note, the color space for RGB is not 0..255, but rather 0..65535. You can convert easily by multiplying each 0..255 value by 257.

As TBE points out, you need to get a handle to your object. The easiest one is FSActLayer. It can get much more complicated if you want your script to work off the active layer, but for most uses H := FSActLayer; will work.

Raymond

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×