79457512

Date: 2025-02-21 13:31:46
Score: 0.5
Natty:
Report link

I was unable to solve this issue, but I found a work around, using send command instead:

line1 = acad.model.AddLine(APoint(0, 0), APoint(100, 100))
acad.doc.SendCommand('select ' + 'l  ')
acad.doc.SendCommand('ai_deselect ')

line2 = acad.model.AddLine(APoint(100, 100), APoint(200, 0))
acad.doc.SendCommand('select ' + 'p ' + 'l  ')
acad.doc.SendCommand('group ')

This draws a line, selects it, then deselect. Line 2 is drawn, the previous selection is highlighted (line 1) and then the last thing drawn (line 2). Then sends the group command.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: HG73