I am creating a gradient inside of a LWPolyLine with the code
(progn
(setq hatch (vla-addHatch mspace
acPreDefinedGradient
"LINEAR"
:vlax-true
acGradientObject)
)
(vlax-put hatch 'PatternAngle (/ pi 2))
(vlax-invoke hatch 'AppendOuterLoop (list pline))
(vla-evaluate hatch)
)
The problem occurs when trying to set the PatternAngle
. I get the error:
Error: AutoCAD.Application: Not applicable
Without that line, it works fine. The gradient is just rotated by 90 degrees.
What am I doing wrong? I have a feeling it has something to do with the acPreDefinedGradient
. Like I shouldn't be using a predefined gradient. Possibly using acUserDefinedGradient
.