Skip to main content

Assembly

partTemplate([param])

Creates a new part and adds it as template to the product container. This part can be used for assembly building.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the new part template
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
[param]objectobject containing all the parameters
[param.name]string"Part"Name of the new part template

Example

res = api.v1.assembly.partTemplate()
res = api.v1.assembly.partTemplate({ name: 'Part_152' })

instance(param)

Creates instances of products and adds them to root assembly, assembly instance or assembly template.

  • If the owner is an instance in the expanded tree, its template in the assembly container will also be updated.
  • If the owner is an assembly template, all instances of the template will also be updated

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created instances
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.productIdstring | real | idid or identifier of the product to instantiate
param.ownerIdstring | real | idid or identifier of the owner of to adding instance, owner can be root assembly, assembly instance or assembly template.
[param.transformation]Array<point> | Array<Array<real>>[0,0,0]transformation [origin, x-Dir, y-Dir] of the instance in global coordinates (default=[0,0,0]) or a 4x4 matrix e.g. [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
[param.name]string"Instance"name for the instance
[param.ident]stringcustom string identifier for the added instance.
[param.isLocal]booleanFALSEflag to define whether the transformation is local to owner or global (default=FALSE). This flag gets important if instances are created and added in sub assemblies. In this case, you probably want to add the instance locally to its owner.

Example

res = api.v1.assembly.instance({ productId: 25, ownerId: 12 })
res = api.v1.assembly.instance({ productId: 25, ownerId: 12, transformation: [{125,0,250},{1,0,0},{0,1,0}] })
res = api.v1.assembly.instance({ productId: 25, ownerId: 12, transformation: [[1,0,0,125],[0,1,0,0],[0,0,1,250],[0,0,0,1]] })

create([param])

Creates a new root assembly. This is the top level assembly.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created root assembly
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
[param]objectobject containing all the parameters
[param.name]string"AssemblyRoot"name for the root assembly
[param.ident]stringcustom string identifier for the created root assembly

Example

res = api.v1.assembly.create()

getPartTemplate([param])

Returns the part template with given name from part container. If name is empty, all parts from part container will be returned.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|Array<id> // id or ids of the found part templates
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
[param]objectobject containing all the parameters
[param.name]stringname of the part to look for

Example

res = api.v1.assembly.getPartTemplate()
res = api.v1.assembly.getPartTemplate({ name: 'Part_125' })

linearPattern(param)

Creates a new linear pattern constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created linear pattern constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the linear pattern constraint in
[param.name]string"LinearPattern"name for the linear pattern constraint
param.instanceIdstring | real | idid of the instance to be copied
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.dir1]objectobject containing the parameters for the first direction of the linear pattern
[param.dir1.count]real1number of copies over the first direction (default=1)
[param.dir1.distance]real100distance between copies over the first direction (default=100)
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.dir2]objectobject containing the parameters for the second direction of the linear pattern
[param.dir2.count]real1number of copies over the second direction (default=1)
[param.dir2.distance]real100distance between copies over the second direction (default=100)

Example

res = api.v1.assembly.linearPattern({ id: 12, instanceId: 112, mate1: { path: [135], csys: 70 } })

updateLinearPattern(param)

Updates an existing linear pattern constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated linear pattern constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the linear pattern constraint to update
[param.name]stringname for the linear pattern constraint
[param.instanceId]string | real | idid of the instance to be copied
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.dir1]objectobject containing the parameters for the first direction of the linear pattern
[param.dir1.count]realnumber of copies over the first direction
[param.dir1.distance]realdistance between copies over the first direction
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.dir2]objectobject containing the parameters for the second direction of the linear pattern
[param.dir2.count]realnumber of copies over the second direction
[param.dir2.distance]realdistance between copies over the second direction

Example

res = api.v1.assembly.updateLinearPattern({ id: 12, instanceId: 112, dir1: { count: 4, distance: 150 } })

getLinearPattern(param)

Returns the linear pattern constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
instanceId: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2?: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
dir1: {
count: real,
distance: real
},
dir2: {
count: real,
distance: real
}
} | Array<{
id: id
instanceId: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2?: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
dir1: {
count: real,
distance: real
},
dir2: {
count: real,
distance: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getLinearPattern({ id: 111, name: 'LP1' })

getAssemblyTemplate([param])

Returns the assembly template with given name from assembly container. If name is empty, all assembly from assembly container will be returned.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|Array<id> // id or ids of the found assembly templates
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
[param]objectobject containing all the parameters
[param.name]stringname of the assembly to look for

Example

res = api.v1.assembly.getAssemblyTemplate()
res = api.v1.assembly.getAssemblyTemplate({ name: 'Assembly_02' })

getInstance(param)

Returns a single, mutliple or all instances of an owner, depending on whether a name is given or not. The owner is the parent of the instance/instances we're looking for and can be a root assembly, another instance or an assembly template.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the found instances
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing all the parameters
param.ownerIdstring | real | idid of the owner from which we are searching the children for instances that have the name we are looking for.
[param.name]stringname of the instance to look for

Example

api.v1.assembly.getInstance({ ownerId: 5, name: 'Inst0' }) // return value = 10
api.v1.assembly.getInstance([
{ ownerId: 5, name: 'Inst0' },
{ ownerId: 5, name: 'Inst1' },
]) // return value = [10, 15]
api.v1.assembly.getInstance({ ownerId: 5 }) // return value = [10, 15, 20]

deleteInstance(param)

Deletes instances from root assembly, other instances or assembly templates.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idsArray<(string|real|id)>ids or identifiers of the instances to delete

Example

res = api.v1.assembly.deleteInstance({ ids: [796, 852, 963] })

fastened(param)

Creates a new fastened constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created fastened constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the fastened constraint in
[param.name]string"Fastened"name for the fastened constraint (default="Fastened")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.xOffset]real0offset along x-axis from mate1 to mate2 (default=0)
[param.yOffset]real0offset along y-axis from mate1 to mate2 (default=0)
[param.zOffset]real0offset along z-axis from mate1 to mate2 (default=0)
[param.xRotation]real0rotation of mate2 in radians around x-axis of mate1 (default=0)
[param.yRotation]real0rotation of mate2 in radians around y-axis of mate1 (default=0)
[param.zRotation]real0rotation of mate2 in radians around z-axis of mate1 (default=0)
[param.useCurrentTransform]booleanFALSEa flag to ignore specified offsets / rotations and recalculate them according to mates' current transforms (default=FALSE)

Example

res = api.v1.assembly.fastened({ id: 25, mate1: { path: [111], csys: 70 }, mate2: { path: [50], csys: 31 } })

updateFastened(param)

Updates an existing fastened constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated fastened constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the fastened constraint to update
[param.name]stringname for the fastened constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.xOffset]realoffset along x-axis from mate1 to mate2
[param.yOffset]realoffset along y-axis from mate1 to mate2
[param.zOffset]realoffset along z-axis from mate1 to mate2
[param.xRotation]realrotation of mate2 in radians around x-axis of mate1
[param.yRotation]realrotation of mate2 in radians around y-axis of mate1
[param.zRotation]realrotation of mate2 in radians around z-axis of mate1
[param.useCurrentTransform]booleanFALSEa flag to ignore specified offsets / rotations and recalculate them according to mates' current transforms (default=FALSE)

Example

res = api.v1.assembly.updateFastened({ id: 36, mate1: { csys: 85 }, xOffset: 150 })

getFastened(param)

Returns the fastened constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

 {
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffset: real
yOffset: real
zOffset: real
xRotation: real
yRotation: real
zRotation: real
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffset: real
yOffset: real
zOffset: real
xRotation: real
yRotation: real
zRotation: real
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getFastened({ id: 25, name: 'Fastened3' })

getFastenedOrigin(param)

Returns the fastened origin constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

 {
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffset: real
yOffset: real
zOffset: real
xRotation: real
yRotation: real
zRotation: real
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffset: real
yOffset: real
zOffset: real
xRotation: real
yRotation: real
zRotation: real
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getFastenedOrigin({ id: 25, name: 'FO_5' })

fastenedOrigin(param)

Creates a new fastened origin constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created fastened origin constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the fastened origin constraint in
[param.name]string"FastenedOrigin"name for the fastened origin constraint (default="FastenedOrigin")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.xOffset]real0offset along x-axis from mate1 to global origin (default=0)
[param.yOffset]real0offset along y-axis from mate1 to global origin (default=0)
[param.zOffset]real0offset along z-axis from mate1 to global origin (default=0)
[param.xRotation]real0rotation of mate2 in radians around x-axis of global origin (default=0)
[param.yRotation]real0rotation of mate2 in radians around y-axis of global origin (default=0)
[param.zRotation]real0rotation of mate2 in radians around z-axis of global origin (default=0)
[param.useCurrentTransform]realFALSEa flag to ignore specified offsets / rotations and recalculate them according to mates' current transforms (default=FALSE)

Example

res = api.v1.assembly.fastenedOrigin({ id: 796, mate1: { path: [111], csys: 70, flip: "-X" }, xRotation: C:PI })

updateFastenedOrigin(param)

Updates an existing fastened origin constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created fastened origin constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the fastened origin constraint to update
[param.name]stringname for the fastened origin constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.xOffset]realoffset along x-axis from mate1 to global origin (default=0)
[param.yOffset]realoffset along y-axis from mate1 to global origin (default=0)
[param.zOffset]realoffset along z-axis from mate1 to global origin (default=0)
[param.xRotation]realrotation of mate2 in radians around x-axis of global origin (default=0)
[param.yRotation]realrotation of mate2 in radians around y-axis of global origin (default=0)
[param.zRotation]realrotation of mate2 in radians around z-axis of global origin (default=0)
[param.useCurrentTransform]booleanFALSEa flag to ignore specified offsets / rotations and recalculate them according to mates' current transforms (default=FALSE)

Example

res = api.v1.assembly.updateFastenedOrigin({ id: 52, xOffset: 150, zOffset: 58 })

revolute(param)

Creates a new revolute constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created revolute constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the revolute constraint in
[param.name]string"Revolute"name for the revolute constraint (default="Revolute")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.zOffset]real0offset along z-axis from mate1 to mate2 (default=0)
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
param.zRotationLimits.minreal | VOIDmin value of rotation around z-axis in radians
param.zRotationLimits.maxreal | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.revolute({ id: 25, mate1: { path: [111], csys: 70 }, mate2: { path: [50], csys: 31 } })

updateRevolute(param)

Updates a revolute constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated revolute constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the revolute constraint to update
[param.name]stringname for the revolute constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.zOffset]realoffset along z-axis from mate1 to mate2
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
param.zRotationLimits.minreal | VOIDmin value of rotation around z-axis in radians
param.zRotationLimits.maxreal | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.updateRevolute({ id: 25, mate2: { flip: '-Z' } })

getRevolute(param)

Returns the revolute constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

 {
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
zOffset: real
zRotationLimits: {
min: real, max: real
}
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
zOffset: real
zRotationLimits: {
min: real, max: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getRevolute({ id: 25, name: 'Rev_12' })

circularPattern(param)

Creates a new circular pattern constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created circular pattern constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the circular pattern constraint in
[param.name]string"CircularPattern"name for the circular pattern constraint (default="CircularPattern")
param.instanceIdstring | real | idid of the instance to be copied
param.mate1objectobject containing the parameters for this mate
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.instanceCount]real1number of copies (default=1)
[param.angle]real0angle in radians between copies (default=0)
[param.offset]real0offset over the rotational axis between copies (default=0)

Example

res = api.v1.assembly.circularPattern({ id: 96, instanceId: 15, mate1: { path: [111], csys: 70 }, instanceCount: 4, angle: 90g })

updateCircularPattern(param)

Updates an existing circular pattern constraint. If optional parameters are not set, the feature will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated circular pattern constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the circular pattern constraint to update
[param.name]stringname for the circular pattern constraint
[param.instanceId]string | real | idid of the instance to be copied
[param.mate1]objectobject containing the parameters for this mate
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.instanceCount]realnumber of copies
[param.angle]realangle in radians between copies
[param.offset]realoffset over the rotational axis between copies

Example

res = api.v1.assembly.updateCircularPattern({ id: 108, instanceCount: 3, angle: 120g })

cylindrical(param)

Creates a new cylindrical constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created cylindrical constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the cylindrical constraint in
[param.name]string"Cylindrical"name for the cylindrical constraint (default="Cylindrical")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.zOffsetLimits]object | VOIDobject defining min and max value of the offset around z-axis
param.zOffsetLimits.minreal | VOIDmin value of the offset along z-axis
param.zOffsetLimits.maxreal | VOIDmax value value of the offset along z-axis
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
param.zRotationLimits.minreal | VOIDmin value of rotation around z-axis in radians
param.zRotationLimits.maxreal | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.cylindrical({ id: 108, mate1: { path: [111], csys: 70 }, mate2: { path: [113], csys: 70 } })

updateCylindrical(param)

Updates an existing cylindrical constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated cylindrical constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the cylindrical constraint to update
[param.name]stringname for the cylindrical constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.zOffsetLimits]object | VOIDobject defining min and max value of the offset around z-axis
param.zOffsetLimits.minreal | VOIDmin value of the offset along z-axis
param.zOffsetLimits.maxreal | VOIDmax value value of the offset along z-axis
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
param.zRotationLimits.minreal | VOIDmin value of rotation around z-axis in radians
param.zRotationLimits.maxreal | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.updateCylindrical({ id: 120, zRotationLimits: { min: 0, max: 90g } })

parallel(param)

Creates a new parallel constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created parallel constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the parallel constraint in
[param.name]string"Parallel"name for the parallel constraint (default="Parallel")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.xOffsetLimits]object | VOIDobject defining min and max value of the offset around x-axis
[param.xOffsetLimits.min]real | VOIDmin value of the offset along x-axis
[param.xOffsetLimits.max]real | VOIDmax value value of the offset along x-axis
[param.yOffsetLimits]object | VOIDobject defining min and max value of the offset around y-axis
[param.yOffsetLimits.min]real | VOIDmin value of the offset along y-axis
[param.yOffsetLimits.max]real | VOIDmax value value of the offset along y-axis
[param.zOffsetLimits]object | VOIDobject defining min and max value of the offset around z-axis
[param.zOffsetLimits.min]real | VOIDmin value of the offset along z-axis
[param.zOffsetLimits.max]real | VOIDmax value value of the offset along z-axis
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
[param.zRotationLimits.min]real | VOIDmin value of rotation around z-axis in radians
[param.zRotationLimits.max]real | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.parallel({ id: 108, mate1: { path: [111], csys: 70 }, mate2: { path: [113], csys: 70 } })

updateParallel(param)

Updates an existing parallel constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated parallel constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the parallel constraint to update
[param.name]stringname for the parallel constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.xOffsetLimits]object | VOIDobject defining min and max value of the offset around x-axis
[param.xOffsetLimits.min]real | VOIDmin value of the offset along x-axis
[param.xOffsetLimits.max]real | VOIDmax value value of the offset along x-axis
[param.yOffsetLimits]object | VOIDobject defining min and max value of the offset around y-axis
[param.yOffsetLimits.min]real | VOIDmin value of the offset along y-axis
[param.yOffsetLimits.max]real | VOIDmax value value of the offset along y-axis
[param.zOffsetLimits]object | VOIDobject defining min and max value of the offset around z-axis
[param.zOffsetLimits.min]real | VOIDmin value of the offset along z-axis
[param.zOffsetLimits.max]real | VOIDmax value value of the offset along z-axis
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
[param.zRotationLimits.min]real | VOIDmin value of rotation around z-axis in radians
[param.zRotationLimits.max]real | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.updateParallel({ id: 108, zRotationLimits: { min: 0, max: 90g } })

planar(param)

Creates a new planar constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created planar constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the planar constraint in
[param.name]string"Planar"name for the planar constraint (default="Planar")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.zOffset]real0offset along z-axis from mate1 to mate2 (default=0)
[param.xOffsetLimits]object | VOIDobject defining min and max value of the offset around x-axis
param.xOffsetLimits.minreal | VOIDmin value of the offset along x-axis
param.xOffsetLimits.maxreal | VOIDmax value value of the offset along x-axis
[param.yOffsetLimits]object | VOIDobject defining min and max value of the offset around y-axis
param.yOffsetLimits.minreal | VOIDmin value of the offset along y-axis
param.yOffsetLimits.maxreal | VOIDmax value value of the offset along y-axis
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
param.zRotationLimits.minreal | VOIDmin value of rotation around z-axis in radians
param.zRotationLimits.maxreal | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.planar({ id: 108, mate1: { path: [111], csys: 70 }, mate2: { path: [113], csys: 70 } })

updatePlanar(param)

Updates an existing planar constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated planar constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the planar constraint to update
[param.name]stringname for the planar constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.zOffset]realoffset along z-axis from mate1 to mate2
[param.xOffsetLimits]object | VOIDobject defining min and max value of the offset around x-axis
param.xOffsetLimits.minreal | VOIDmin value of the offset along x-axis
param.xOffsetLimits.maxreal | VOIDmax value value of the offset along x-axis
[param.yOffsetLimits]object | VOIDobject defining min and max value of the offset around y-axis
param.yOffsetLimits.minreal | VOIDmin value of the offset along y-axis
param.yOffsetLimits.maxreal | VOIDmax value value of the offset along y-axis
[param.zRotationLimits]object | VOIDobject defining min and max value of rotation around z-axis
param.zRotationLimits.minreal | VOIDmin value of rotation around z-axis in radians
param.zRotationLimits.maxreal | VOIDmax value of rotation around z-axis in radians

Example

res = api.v1.assembly.updatePlanar({ id: 108, zOffsetLimits: { min: 0, max: 150 } })

slider(param)

Creates a new slider constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created slider constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the slider constraint in
[param.name]string"Slider"name for the slider constraint (default="Slider")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.xOffset]real0offset along x-axis from mate1 to mate2 (default=0)
[param.yOffset]real0offset along y-axis from mate1 to mate2 (default=0)
[param.zOffsetLimits]object | VOIDobject defining min and max value of the offset around z-axis
param.zOffsetLimits.minreal | VOIDmin value of the offset along z-axis
param.zOffsetLimits.maxreal | VOIDmax value value of the offset along z-axis

Example

res = api.v1.assembly.slider({ id: 108, mate1: { path: [111], csys: 70 }, mate2: { path: [113], csys: 70 } })

updateSlider(param)

Updates an existing slider constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated slider constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the slider constraint to update
[param.name]stringname for the slider constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.xOffset]realoffset along x-axis from mate1 to mate2
[param.yOffset]realoffset along y-axis from mate1 to mate2
[param.zOffsetLimits]object | VOIDobject defining min and max value of the offset around z-axis
param.zOffsetLimits.minreal | VOIDmin value of the offset along z-axis
param.zOffsetLimits.maxreal | VOIDmax value value of the offset along z-axis

Example

res = api.v1.assembly.updateSlider({ id: 108, mate1: { path: [111], csys: 70 }, mate2: { path: [113], csys: 70 } })

getCircularPattern(param)

Returns the circular pattern constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
instanceId: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
instanceCount: real
angle: real
offset: real
} | Array<{
id: id
instanceId: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
instanceCount: real
angle: real
offset: real
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getCircularPattern({ id: 111, name: 'CP1' })

getSlider(param)

Returns the slider constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffset: real
yOffset: real
zOffsetLimits: {
min: real, max: real
}
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffset: real
yOffset: real
zOffsetLimits: {
min: real, max: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getSlider({ id: 111, name: 'Slider_2' })

getParallel(param)

Returns the parallel constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffsetLimits: {
min: real, max: real
}
yOffsetLimits: {
min: real, max: real
}
zOffsetLimits: {
min: real, max: real
}
zRotationLimits: {
min: real, max: real
}
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
xOffsetLimits: {
min: real, max: real
}
yOffsetLimits: {
min: real, max: real
}
zOffsetLimits: {
min: real, max: real
}
zRotationLimits: {
min: real, max: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getParallel({ id: 111, name: 'Parallel_12' })

getPlanar(param)

Returns the planar constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
zOffset: real
xOffsetLimits: {
min: real, max: real
}
yOffsetLimits: {
min: real, max: real
}
zRotationLimits: {
min: real, max: real
}
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
zOffset: real
xOffsetLimits: {
min: real, max: real
}
yOffsetLimits: {
min: real, max: real
}
zRotationLimits: {
min: real, max: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getPlanar({ id: 111, name: 'Planar' })

getCylindrical(param)

Returns the cylindrical constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
zOffsetLimits: {
min: real, max: real
}
zRotationLimits: {
min: real, max: real
}
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
zOffsetLimits: {
min: real, max: real
}
zRotationLimits: {
min: real, max: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getCylindrical({ id: 111, name: 'Cylindrical' })

update3DConstraintValue(param)

Updates multiple limited values of constraints

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the constraint to update a value
param.name"X_OFFSET" | "Y_OFFSET" | "Z_OFFSET" | "Z_ROTATION"name of the param to update the value
param.valuerealvalue to set for the given constraint value

Example

res = api.v1.assembly.update3DConstraintValue({ id: 76, name: 'X_OFFSET', value: 50 })

convertToTemplate([param])

Converts the current root assembly into an assembly template and creates a new root assembly, where the new template can be used to create instances from.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
[param]objectobject containing the parameters
[param.name]string"Subassembly"name of the new converted template (default="Subassembly")

Example

res = api.v1.assembly.convertToTemplate()

exportNode(param)

Exports a node from the assembly tree or a template from containers. A node can be any instance (part or assembly) in the tree. A template can be a part or assembly, doesn't matter if it has already been instantiated or not. In any case, if the node or template is a part, the root of the created file is a part. In case of the node or template is an assembly, the root of the created file is a root assembly. By default the model is written to a data string.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
success: boolean,
content?: string // content is the data string of the export and is only available if neither file nor url is defined.
}
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
param.idstring | real | idid of the node or template to export
param.format"OFB" | "STP"type of file to export the node or template as
[param.file]stringfull path of the file. Path has to be a for the ClassCAD process reachable local or UNC path.
[param.url]stringurl to send the model data to.
[param.encoding]"base64"the encoding the data will be encoded with. If compression is also set, the decoding happens after compression!
[param.compression]"deflate"the compression algorithm the data is compressed with.

Example

res = api.v1.assembly.exportNode({ id: 125, format: 'STP' })

finishMovingUnderConstraints(param)

Finishes moving the constrained objects.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
param.idstring | real | idid of the assembly which contains the moved objects

Example

res = api.v1.assembly.finishMovingUnderConstraints({ id: 796 })

moveUnderConstraints(param)

Attempts to move constrained objects.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
param.idstring | real | idid of the assembly which contains the moved objects
param.rotationobjectobject containing three consecutive rotation (basis) vectors
param.rotation.xDirpointbasis vector containing the rotation around x-axis
param.rotation.yDirpointbasis vector containing the rotation around y-axis
param.rotation.zDirpointbasis vector containing the rotation around z-axis
param.offsetpointvector containing the translation

Example

res = api.v1.assembly.moveUnderConstraints({ id: 796, rotation: { xDir: [0,-1,0], yDir: [1,0,0], zDir: [0,0,1] })
res = api.v1.assembly.moveUnderConstraints({ id: 796, offset: [20,150,30] })

startMovingUnderConstraints(param)

Prepares to move constrained objects.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
param.idstring | real | idid of the assembly which contains the moved objects
param.instanceIdsArray<(string|real|id)>ids of the instances to be moved
param.pivotInfopointthis is the fixed point, where the object rotates around
param.mucType"TRANSLATION_1D" | "TRANSLATION_2D" | "ROTATION"type of transformation

Example

res = api.v1.assembly.startMovingUnderConstraints({
id: 796,
instanceIds: [handleInst1],
pivotInfo: [50, 50, 20],
mucType: 'ROTATION',
})

transformInstance(param)

Transforms instances by the given transformation.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid or identifier of the instance to transform
param.transformationArray<point>transformation [origin, x-Dir, y-Dir] of the instance in global coordinates
[param.isLocal]booleanFALSEboolean flag to define whether the transformation is local to owner or global(default=FALSE)

Example

res = api.v1.assembly.transformInstance({
id: 150,
transformation: [
[-10, -10, 0],
[1, 0, 0],
[0, 1, 0],
],
})

loadProduct(param)

Loads a product from file, data or url.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: { id: string|real|id } | VOID // object containing id of the loaded product
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
[param.url]stringurl to load product from
[param.file]stringfull path of the file. Path has to be a for the ClassCAD process reachable local or UNC path.
[param.data]stringdata/content of the model to load
[param.encoding]"base64"the encoding the data is encoded with. If compression is also set, the decoding happens first!
[param.compression]"deflate"the compression algorithm the data is compressed with.
[param.format]"OFB" | "STP"content format of to load product
[param.ident]stringcustom string identifier for the loaded product.

Example

res = api.v1.assembly.loadProduct({ file: '/var/models/file.stp' })
res = api.v1.assembly.loadProduct({ url: 'https://.../file.ofb', format: 'OFB' })
res = api.v1.assembly.loadProduct({ data: 'abc123', format: 'OFB' })

setCurrentInstance(param)

Sets the given instance as the current. The current product will also be set to the current instance's product template. TODO: Description of the LGS3D context? The constraint context for this instance will be solved?

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the instance to set as the current one

Example

res = api.v1.assembly.setCurrentInstance({ id: 796 })

setIdent(param)

Sets a string identifier for an existing object

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the object to set an identifier on
param.identstringidentifier for the given object. Must be unique.

Example

res = api.v1.assembly.setIdent({ id: 796, ident: 'ident_526' })

gear(param)

Creates a new gear relation. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created gear relations
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the gear relation in
[param.name]string"GearRelation"name for the gear relation (default="GearRelation")
param.constr1Idstring | real | idid of the first constraint of the relation
param.constr2Idstring | real | idid of the second constraint of the relation
[param.ratio]real1ratio value of rotational velocity (d(constr2.zRotationValue) / d(constr1.zRotationValue)) (default=1)
[param.offset]real0offset value of the second mate angle in radians (default=0)

Example

res = api.v1.assembly.gear({ id: 796, constr1Id: 50, constr2Id: 56, ratio: 0.5 })

updateGear(param)

Updates an existing gear relation. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated gear relations
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the gear relation to update
[param.name]stringname for the gear relation
[param.constr1Id]string | real | idid of the first constraint of the relation
[param.constr2Id]string | real | idid of the second constraint of the relation
[param.ratio]realratio value of rotational velocity (d(constr2.zRotationValue) / d(constr1.zRotationValue))
[param.offset]realoffset value of the second mate angle in radians

Example

res = api.v1.assembly.updateGear({ id: 50, offset: 1.57 })

group(param)

Creates a new group constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created group constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the gear relation in
[param.name]string"Group"name for the group constraint (default="Group")
param.instanceIdsstring | real | idids of the instances to group

Example

res = api.v1.assembly.group({ id: 796, instanceIds: [114, 125, 129] })

updateGroup(param)

Updates an existing group constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated group constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the group constraint to update
[param.name]stringname for the group constraint
[param.instanceIds]string | real | idids of the instances to group

Example

res = api.v1.assembly.updateGroup({ id: 56, instanceIds: [114, 129] })

assemblyTemplate([param])

Creates a new assembly and adds it as template to the product container. This assembly can be used for assembly building.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the new assembly template
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
[param]objectobject containing all the parameters
[param.name]string"Assembly"name of the new assembly template (default="Assembly")

Example

res = api.v1.assembly.assemblyTemplate()

from(param)

Creates an assembly from a json defined assembly or an ecxml definition.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created root assembly
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
[param.url]stringurl to load from
[param.file]stringfull path of the file. Path has to be a for the ClassCAD process reachable local or UNC path.
[param.data]stringdata/content to load from
[param.format]"JSON" | "XML" | "ECXML"content format of to load from, has to be passed if load from stream or url

Example

res = api.v1.assembly.from({ file: '/var/models/file.ecxml', format: 'ECXML' })
res = api.v1.assembly.from({ url: 'https://.../file.ofb', format: 'ECXML' })
res = api.v1.assembly.from({ data: 'abc123', format: 'JSON' })

getSpherical(param)

Returns the spherical constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
yRotationLimits: {
min: real, max: real
}
} | Array<{
id: id
name: string
mate1: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
mate2: {
path: id[],
csys: id,
flip: "X" | "-X" | "Y" | "-Y" | "Z" | "-Z",
reorient: "0" | "90" | "180" | "270"
}
yRotationLimits: {
min: real, max: real
}
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getSpherical({ id: 111, name: 'Spherical2' })

getGroup(param)

Returns the group constraint of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
instanceIds: id[]
name: string
} | Array<{
id: id
instanceIds: id[]
name: string
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for constraint
param.namestringthe name of the constraint to look for

Example

res = api.v1.assembly.getGroup({ id: 111, name: 'Group_Left' })

createUncommitedObject(param)

Attention: This method should only be used, if the intention is very clear. Creates a new uncommited (empty) object in the given assembly.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created object
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the assembly to create the uncommited object in
param.typestringthe type of object to be created
param.namestringthe name of the object to be created

Example

res = api.v1.assembly.createUncommitedObject({ id: 12, type: 'CC_FastenedConstraint', name: 'Fastened' })

getGear(param)

Returns the gear relation of given reference with specified name.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: {
id: id
name: string
constr1Id: id
constr2Id: id
ratio: real
offset: real
} | Array<{
id: id
name: string
constr1Id: id
constr2Id: id
ratio: real
offset: real
} | VOID> | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the product or instance to look for the relation
param.namestringthe name of the relation to look for

Example

res = api.v1.assembly.getGear({ id: 111, name: 'Gear_Left' })

spherical(param)

Creates a new spherical constraint. If optional parameters are not set, the default values will be used, see (default=xy).

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the created spherical constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the assembly to create the spherical constraint in
[param.name]string"Spherical"name for the spherical constraint (default="Spherical")
param.mate1objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate (default="Z")
[param.mate1.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
param.mate2objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z""Z"flip type which defines the global main axis of the mate 2 (default="Z")
[param.mate2.reorient]"0" | "90" | "180" | "270""0"orientation around the main axis in 90° steps (default="0")
[param.yRotationLimits]object | VOIDobject defining min and max value of rotation around y-axis
param.yRotationLimits.minreal | VOIDmin value of rotation around y-axis in radians
param.yRotationLimits.maxreal | VOIDmax value of rotation around y-axis in radians

Example

res = api.v1.assembly.spherical({ id: 108, mate1: { path: [111], csys: 70 }, mate2: { path: [113], csys: 70 } })

updateSpherical(param)

Updates an existing spherical constraint. If optional parameters are not set, the constraint will keep the existing values.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id|VOID|Array<id|VOID> // id or ids of the updated spherical constraints
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobject | Array<object>object or objects containing the parameters
param.idstring | real | idid of the spherical constraint to update
[param.name]stringname for the spherical constraint
[param.mate1]objectobject containing the parameters for mate 1
param.mate1.pathArray<(string|real|id)>mate path to the first part as array
param.mate1.csysstring | real | idid of the work coordinate system to use for this first mate
[param.mate1.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate
[param.mate1.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.mate2]objectobject containing the parameters for mate 2
param.mate2.pathArray<(string|real|id)>mate path to the second part as array
param.mate2.csysstring | real | idid of the work coordinate system to use for this second mate
[param.mate2.flip]"X" | "-X" | "Y" | "-Y" | "Z" | "-Z"flip type which defines the global main axis of the mate 2
[param.mate2.reorient]"0" | "90" | "180" | "270"orientation around the main axis in 90° steps
[param.yRotationLimits]object | VOIDobject defining min and max value of rotation around y-axis
param.yRotationLimits.minreal | VOIDmin value of rotation around y-axis in radians
param.yRotationLimits.maxreal | VOIDmax value of rotation around y-axis in radians

Example

res = api.v1.assembly.updateSpherical({ id: 108, mate1: { path: [111], csys: 70 } })

setCurrentProduct(param)

Sets the current product. The current product is exported in the save commando.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: id | VOID // id of the product which was the current one before calling this function
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
param.idstring | real | idid of the product to become the current one

Example

res = api.v1.assembly.setCurrentProduct({ id: 796 })

calculateMassProperties(param)

Calculates the center of gravity (cog) and the volume of the given object. Depending on the input parameter the calculations were made on a single solid, a part, a subassembly, the whole model, ... E.g. the center of gravity of a root assembly, will be the sum of all solid's center of gravity over the whole assembly structure. If a solid is given, the center of gravity will be local to its part.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: { cog: point, volume: real } | VOID // object containing the center of gravity and the volume
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing the parameters
param.idstring | real | idid of the object to get the mass properties from

Example

res = api.v1.assembly.calculateMassProperties({ id: 91 })

deleteTemplate(param)

Deletes a part or assembly template.

Kind: v1.assembly function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idsArray<(string|real|id)>ids of the templates to delete

Example

res = api.v1.assembly.deleteTemplate({ ids: [796, 852, 963] })