Hello,
I am trying to pass in a filled region type and change the color, however, I dont think I have my syntax quite right. I have attached an image with simple script and error message.
Thankyou
Hello,
I am trying to pass in a filled region type and change the color, however, I dont think I have my syntax quite right. I have attached an image with simple script and error message.
Thankyou
You can use:
NewFill.BackgroundPatternColor = DB.Color(R,G,B)
or probably:
NewFill.ForegroundPatternColor = DB.Color(R,G,B)
The color is a property, so cannot be used as a function()
Also put your t.Commit()
outside the for loop!
amazing thankyou!
Out of interest, why didnt my go work, using:
NewFill.BackgroundPatternColor(DB.Color(R,G,B))
Thankyou
Your NewFill is an object
, objects have properties
and methods
.
A property is, as its saying, a property. For a e.g. Line
this can be the Startpoint
, Centerpoint
or Length
. Methods are actions you do with the object. Stuff like Move
, Rotate
. (You could say property is a noun, methods are verbs). Methods and properties are written like:
Object.Method(input)
Object.Property
The color of a NewFill
is a property. You called it as a Method
, but you had to change the property