Kicad nightly: GetTimeStamp, SetTimeStamp are gone?

Hi,
it seems that in kicad nightly the following functions are missing:
GetTimeStamp (for EDA_ITEM, BOARD_ITEM, PAD, TRACK, MODULE)
SetTimeStamp (for EDA_ITEM, BOARD_ITEM, PAD, TRACK, MODULE)

Is there anyone that can point me to the related commit?

my pcbnew details:

Application: Pcbnew
Version: (5.99.0-1014-gaa95ff10d), release build
Libraries:
wxWidgets 3.0.4
libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Build date: Mar 1 2020 21:58:32
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.66.0
Compiler: GCC 9.2.0 with C++ ABI 1013

Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

In nightly, this has moved to the KIID class.

@Seth_h
thanks…
for ‘SetTimeStamp’ it seems now it can be done only when creating an object and cannot be modified after its creation… is that correct?

Yes. In V6, objects will have a set unique ID that can never change. These are used to dereference items in groups, sheets and rooms as well as tracking generated vs originated items.

2 Likes

thanks, I will adapt my scripts accordingly :smiley:

1 Like

Is it possible to assign a Uuid to a track (even if only on its creation), as it was possible to assign it a TimeStamp?

@maui Thanks for the updating to the plugin!


The track rounder plugin works again in 5.99

Yes, all objects will have a trackable UUID that doesn’t change.

Sorry for not being clear… I would need to set a specific UUID at the track creation using python.
Here the code I’m testing:

import pcbnew
pcb = pcbnew.GetBoard()
tk=pcb.GetTracks()[0]
tk.m_Uuid.AsString()
result:
u'2089d4c6-bb9d-4359-8660-f1b54b6c3304'
tk.m_Uuid.Hash()
result:
1633978350919474L
tk.m_Uuid.AsLegacyTimestampString()
result:
u'00000000'
tk.m_Uuid.AsLegacyTimestamp()
result:
0

  1. it seems the function doesn’t return a Legacy Timestamp conversion from UUID

  2. is there a way to assign an UUID to a trace when creating it in python?

i.e. (as I do in Kv5):
new_track = pcbnew.TRACK(pcb)
new_track.SetStart(p1)
new_track.SetEnd(p2)
new_track.SetWidth(FromUnits(w))
new_track.SetNet(Nn)
new_track.SetLayer(layer)
new_track.SetTimeStamp(tsc)
pcb.Add(new_track)

The AsLegacyTimestamp() and related functions will be removed before v6 is released. These functions are only to ease the transition to UUID while we still utilize the older schematic file format. Once we not long save to the legacy format, all timestamps will be converted to UUID on read and there will be no output of legacy timestamps anymore.

The UUID will be assigned when creating the object and cannot be changed (by design). Is there a need to set specific UUIDs?

Stitching vias, Fielding vias, Track rounder Action Scripts use to set a specific TimeStamp to identify vias or tracks added by the script(s).
In this way it is (was) possible to erase i.e. only vias added using via stitching script among all the vias of the board.

1 Like

I think that this functionality will be part of https://gitlab.com/kicad/code/kicad/-/issues/1964 rather than abusing (nicely!) the timestamp.

I’ve upvoted the issue, hoping this will be added to v6… it can be definitely a plus for action scripts.

Geeze! How did you get your plugins to work for the nightly??

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