Scripting PCBNEW,module position, auxiliary ref position

Hi,
I own an entry level pick and place machine. And as the machine got a quite little axes angle offset I’d like to try a correction of position before importing datas to the machine software to save correction time on the machine.
I plan to write a basic action plugin creating the text file ready to import.

I’ve found how to get modules positions (x,y), values… but I also need the auxiliary position as well.
Does someone knows how to get it?

Sincerely,

s = board.GetDesignSettings()
s.GetAuxOrigin()
# wxPoint (71500000, 51000000)
2 Likes

Hi,
I tried:

board=pcbnew.GetBoard()
s = board.GetDesignSettings()
s.GetAuxOrigin()

but I got a : “AttributeError: ‘BOARD_DESIGN_SETTINGS’ object has no attribute 'GetAuxOrigin”

So how board is defined?

Sincerely

What is your kicad version? The snippet I provided works on 6.0.

kicad version is: 5.1.12

Then use this to access aux origin:
board.GetDesignSettings().m_AuxOrigin

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.