Jump to content

Mapping OIP drop-down menu to a shortcut key?


Recommended Posts

The scriptbelow seems to do what you want. In line 12 change the 'Polyline' to 'Arrow' to get the other version.

 

Take a look at this thread about how to make it into a Menu Command and add that command to a workspace and give it a keyboard shortcut.

 

 

Procedure SetCircuitType;
{December 9, 2022}
{©2022 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{No Warranty Expressed or Implied. Use at your own risk.}

VAR	H1	:Handle;

Procedure Execute(Hd1:Handle);
BEGIN
	SetRField(Hd1,'Circuit','CircuitType','Polyline');
	ResetObject(Hd1);
	ResetObject(Hd1);
End;

BEGIN
	ForEachObject(Execute,(((PON='Circuit') & (SEL=TRUE))));
End;

Run(SetCircuitType);

 

Link to comment
  • 3 weeks later...

Hey @Pat Stanford I was able to re-create the oddity I experienced.

 

If you toggle from polyline to arrow using the OIP, all works as expected. However, when using the script, the source and destination arrows appear differently. They don't appear as short arrows, and sometimes they are oddly aligned. Screen grab and file attached. Top is OIP, bottom is script. 

 

Arrow to polyline works as expected using either your script or the OIP

Screen Shot 2022-12-30 at 2.11.13 PM.png

simple CC circuit.vwx

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...