The Pulsonix API License

It should be noted that the Pulsonix API license feature is not a general feature that is available. It is a partner license that is only available under an NDA and license agreement, and as such carries a third party license cost.

What is an API?

An application programming interface, or API, is an interface which allows accessing of functions and data from outside the application. This enables your own code to interact with the Pulsonix application and data.

As stated above, this feature using a special license which is available as a cost option. Please contact your local sales office for further information.

What can it do?

The Pulsonix API provides you with the ‘hooks’ to access a range of design data, including ‘read’ access to the majority of design and library data and also ‘write’ access to some aspects of this data.

How to use the pulsonix API

To launch Pulsonix from an external scripting interface, use the command:

CreateObject(“pulsonix.app”)

pulsonix.app is the external name used for the Pulsonix application, which is not case sensitive. CreateObject returns the Pulsonix application as an object, which can be used to access all the functionality available in the Pulsonix API.

Examples

Write Plots

In this example, we will launch Pulsonix and write out two predefined plots for the top and bottom side of the our board.

	Set MyApp = CreateObject("pulsonix.app")
	If Not MyApp Is Nothing Then
		Set Design = MyApp.ActiveDocument()
		If Not Design Is Nothing Then
			Set Writer = MyApp.NewReportWriter()
			Writer.WritePlot('Top')
			Writer.WritePlot('Bottom')
		End If
	End If
	Call MyApp.QuitApp
	

Component details

In this example, we will launch Pulsonix, open a design and write out details about all the components in the design.

	Set MyApp = CreateObject("pulsonix.app")
	If Not MyApp Is Nothing Then
		Set Design = MyApp.OpenDocument("C:\Program Files\Pulsonix 12.0\Examples\4L-SM-A.pcb")
		If Not Design Is Nothing Then
			Set Writer = MyApp.NewReportWriter()
			Set DesignComps = Design.Components()
			DesignComps.GroupBy ("side")
			DesignComps.GroupBy ("partname")
			DesignComps.SortBy ("name")
			For Each Comp In DesignComps
				Writer.Write (Comp.PartName)
				Writer.Write (Comp.Name)
				Set CompPos = Comp.Position
				Writer.Write (Design.DsuToString(CompPos.X))
				Writer.Write (Design.DsuToString(CompPos.Y))
				Writer.Write (Comp.Angle)
				Side = "Top"
				If (Comp.Mirrored) Then
					Side = "Bottom"
				End If
				Writer.Write (Side)
				Writer.EndOfLine
			Next
		End If
	End If
	Call MyApp.QuitApp
	

Scripting Reference contains a full list of the functionality available in the Pulsonix API.

Scripting Reference