Hi,
I'm having troubles to get vs.GetPt() working.
What I have is a plugin written in Python that places a textbox with text from the plugin parameters on the mouse last location. -> This works (code below)
Although vs.GetMouse isn't so precisely because when moving the mouse fast after clicking, I receive another location. So I want to use the Getpt() function.
Is there any way to get vs.GetPt() working? Or am I doing something wrong?
p = vs.GetMouse()
CabinetNr = getattr(vs, 'PKastNr')
Material = getattr(vs, 'PMateriaal')
Text = 'K'+ CabinetNr + chr(13) + Material
Length = len(Text)
PosEnter = Text.index(chr(13))
#p = vs.GetPt() --> NOT WORKING HERE
vs.TextOrigin(p)
vs.CreateText(Text)
h = vs.LNewObj()
vs.SetTextFont(h, 0, Length, vs.GetFontID('Arial'))
vs.SetTextSize(h, 0, PosEnter, 12)
vs.SetTextSize(h, PosEnter, Length-PosEnter, 7)
Thank you,
Bert