GRAPHISOFT®

Python APIVersion: 0.23 Beta

CreateArc

Creates an Arc element.

def CreateArc (element) -> String

 

Parameters

element
[in] An APIObject describing the Arc element to create.

 

Return Values

This function returns the GUID of the created element.

 

Remarks

This function is analogous to the ACAPI_Element_Create function of the C++ API for Arc elements. Undefined members will be set to the current defaults.

For information on how to fill the passed APIObject, visit the C++ documentation.

 

Example

def DrawCircle (x, y, r):
    element = APIObject ()
    element.head = APIObject ()
    element.head.typeID = API_ArcID
    element.origC = APIObject ()
    element.whole = True
    element.origC.x = x
    element.origC.y = y
    element.r = r
    CreateArc (element)

def DrawArc (x, y, r, beg, end):
    element = APIObject ()
    element.head = APIObject ()
    element.head.typeID = API_ArcID
    element.origC = APIObject ()
    element.whole = False
    element.origC.x = x
    element.origC.y = y
    element.r = r
    element.begAng = beg
    element.endAng = end
    CreateArc (element)

DrawCircle (6, 7, 8)
DrawCircle (3, 10, 1)
DrawCircle (9, 10, 1)
DrawArc (6, 6, 4, 3.14, 6.28)

 

Requirements

Version: Python API 0.1 or Later
Module: GS

 

See Also

ChangeArc, GetArc

All functions