Page 1 of 1

set current linetype-lineweight scripts - How to update Pen Toolbar?

Posted: Sat Mar 28, 2020 8:40 am
by dfriasb
Hi all,

I've written some scripts to set current linetype and lineweight with command line and keyboard input. They are working exactly as I wanted, but Pen Toolbar is not updated when script runs. This is a little bit confusing for me. Can I introduce some function in script to update Pen Toolbar? Any help will be very welcomed.

Best regards,

Re: set current linetype-lineweight scripts - How to update Pen Toolbar?

Posted: Sat Mar 28, 2020 1:18 pm
by CVH
A source of info might be:
PenToolBar.js

Regards,
CVH

Re: set current linetype-lineweight scripts - How to update Pen Toolbar?

Posted: Sat Mar 28, 2020 1:45 pm
by CVH
What I read there is:
The startup values are gathered as: colorCombo.setColor(di.getCurrentColor());
di is the document interface.
On a value change it is stored as:
EAction.getDocumentInterface().setCurrentColor(color);

The diff with yours is that you change the document pen.
PenToolBar.js alters the document interface pen....

Regards,
CVH