The Cadence Academic Network helps build strong relationships between academia and industry, and promotes the proliferation of leading-edge technologies and methodologies at universities renowned for their engineering and design excellence.

A huge knowledge exchange platform for academia to network with industry. We are looking for academic speakers to talk about their research to the industry attendees at the Academic Track at CDNLive EMEA and Silicon Valley.

and I've also tried running a script that I've recorded that does the exact same, but both methods fail. They do launch the place manual command but I cannot get skill to pick that coordinate so that it is left for me to move the component

34 Replies

I can use the following code
Command=strcat("place manual refdes" refdes_name)
axlShell(Command)

The only demand here is that the refdes_name is an unplaced symbol, I'm however missing 2 things if I do this.
1. After typing the command at the command line I would like to skill program to make the PCB editor window the main window - otherwise my shortcuts for rotate, mirror etc. does not work.
2. After the part is placed the place manual dialog is still shown and I would like it to close automatically after the user places the component

Without knowing exactly what you are trying to do it is difficult to offer help.However, I don't think many of us would try to do this type of function using Shell commands. I suggest that you look up the axlDynamicsObject and axlEnterEvent functions and base some code around those.

I can give you some sample code if I know what you are trying to do, and why.

Restrictions: 1) Do not register this as an Allegro command via axlCmdRegister or you will find Allegro will immediately terminate the place manual command. Instead call it via Skill ex: skill "ptest" 2) Make certain your pick from Skill is on a visiable portion of the symbol (not its center uness you have something like place bound on). Pins are typically visible.

Let me see if I can explain this better.Normally you would use place manual and select a specific reference designator that should be moved or placed(if unplaced)

Instead I would like to write mc c1 in the command line and it should launch manual place in hide mode and attach C1 to the cursor for me to place whereever I want.

As soon as the component is placed the manual place dialog should close down again and the Allegro PCB Editor should be left in idle mode.

I've attached a skill program find_cmp.il which basically does what I would like to do with respect to move/place manual. I've also attached my own revision called move_cmp.il which works almost as expected. writing mc c1 in the command line brings c1 to the cursor for movement - I can however not use my shortcuts (r iangle 90 or o pop mirror) and when I place the component the place manual dialog is still open.

I've looked through tons of skill code and also all the examples in share\pcb\examples\skill without finding anything that I could use or some good examples. All code that I can find places objects at specific coordinates which is not what I'm looking for - I've tried looking at the dynamicobjects functions but they're very sparse documented and there's no examples that I can use to understand this better - some of them are written in pseudocode which cannot just be launched for test.

I hope someone knows more about this and can help me, thanks in advance.

Attached is some simple code that might help. It demonstrates use of dynamic objects, events, popups and transactions.It uses some "private" Cadence functions, and some dubious coding of my own for the popups, so use with care. However, I have tested it in 15.2 and 15.5.1 and it possibly does what you want.

It will place symbols off grid. You could fix this by changing the third argument of axEnterEvent to t and/or change event ->xy to event ->xySnap.

This is actually what I'm looking for - this is great. I can see that you've added the popup menu items - do you know if it is possible also to create keyboard shortcuts that are available during this command?E.g., pressing R instead of choosing right click and rotate.

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.