Issue
This is the Visual LISP code I have used to set a bulge for a polyline:
Command: !pline
#
Command: !mspace
#
Command: (vla-SetBulge mSpace pline 0 0.5)
; error: ActiveX Server returned the error: unknown name: SetBulge
Command: (vla-put-SetBulge pline 0 0.5)
; error: no function definition: VLA-PUT-SETBULGE
Command: (vlax-invoke-method mspace 'setbulge pline 0 0.5)
; error: ActiveX Server returned the error: unknown name: SETBULGE
Command: (vlax-put-property pline 'setbulge 0 0.5)
; error: ActiveX Server returned an error: Type mismatch
What is the correct syntax to use?
Solution
The documentation contains the information to answer this question. In the AutoCAD ActiveX and VBA Reference, go to Object Model -> Polyline Object -> SetBulge Method.
After reading these two references, you should notice that SetBulge is a method of the polyline object, not a Property nor a Method of the Model Space Collection (which is what the preceding code shows).
You'll find that the following code will set the bulge of a Polyline Object:
(vla-SetBulge myPolyObj 1 -0.42080)
Because it is easier to see this in context, code was copied from , and modified it to use the SetBulge method for a polyline: