Friday, May 31, 2013

Scripts - Server Processes Reference

Shown below is a simple Delphi Script I created to break all Component Groups in a PCB.

// Break All Component Groups
// Randy Clemmons

Var
 Board : IPCB_Board;

Procedure Start;
begin
   Board := PCBServer.GetCurrentPCBBoard;
   if Board = nil then
   begin
        ShowMessage('Active Window is Not a .PcbDoc File');
        exit;
   end;

   // http://wiki.altium.com/display/ADOH/PCB+Processes
   // Examples
   // Process: PCB:GroupPrimitives
   // Parameters: Action=BreakAllComponentUnions
   // Parameters: Action=Explode | Object=ALL

    AddStringParameter('Action','BreakAllComponentUnions');
    RunProcess('PCB:GroupPrimitives');
end;


Modifying Schematic Objects (Altium Forum)

To modify Schematic objects on a current Schematic document, you will need to invoke certain methods in a particular order to ensure the Undo/Redo system is up to date when a schematic object’s attributes have been modified programmatically.
The sequence is as follows:
  • Invoke the PreProcess method which initialize the robots in the schematic server
  • Send a SCHM_BeginModify message
  • Modify the Schematic object by changing its attributes (Properties)
  • Send a SCHM_EndModify message
  • Invoke the PostProcess method to clean up the robots in the Schematic server.


Wednesday, May 29, 2013

Parameter Manager - Stop Auto Sorting

In a sort enabled column, the rows get re-arranged (auto sorted) as data is entered or edited. 

This can be annoying when you are editing data.  It can be difficult to track of which cell was last edited and which cells were adjacent to the last edited cell.

As shown below the Description column is sort enabled, in this mode rows will be sorted auto-magically when the Descriptions are edited.










Multi-level sorting is also supported, hold down the Shift key as you click to sub-sort by a second (or third) column.


The Auto Sorting behavior can be disabled by holding down the Ctrl Key and clicking on the Column heading, i.e. Description heading in this example.










Note the indented triangle is displayed in the header when Auto Sorting is enabled.

Interactive Net Length Calculation - Real Time Length

Interactive Net Length Calculation - English documentation - The Altium Wiki:



For Real Time Routed Net Length Displays

Shift+H to Toggle Heads Up Display (HUD)
Shift+G to Toggle Toggle Cursor Tracking (HUD Display Tracks the Cursor)



















The Net Length is also updated in the PCB Panel (In Real Time)













New in 13.2.5 - Live Drill Drawing Table

Live Drill Drawing Table - English documentation - The Altium Wiki:

'via Blog this'

Hatched Polygons

Hatched Polygon Example:



Outjob - Define Output Filenames using Expressions

Define Output Filenames using Expressions - English documentation - The Altium Wiki:


=ProjectAssyNumber + '_' +ProjectName + '-' + ProjectRevision + '.PDF'
or
=VariantName + '_' + OutputName + '.PDF'

'via Blog this'

Wednesday, May 22, 2013

DXF Import - Altium Video

How to Import Graphics and RF Geometries Using DXF Files


Key points include:


* Creating near zero width lines for accuracy.

* Converting Primitives to Solid Shapes using Polygons.

Script - Run with Shortcut Key

C:\Altium_RJC\Altium_Central\Scripts\Fix_Connections_v1.0\Fix_Connections.PrjScr




Create New or Edit a Custom Shortcut Key (Hotkey)

Right Click on Main Toolbar > Customize > [Custom]















Example Settings





















Process:

ScriptingSystem:RunScript

Parameters:

ProjectName=C:\Altium_RJC\Altium_Central\Scripts\Fix_Connections_v1.0\Fix_Connections.PrjScr|ProcName=Fix_Connections.pas>Start

Shortcuts:

Assign Primary Key to run the Script.

Tip: Edit existing menu short cuts by holding down Ctrl + Select Menu Button

Bitmap Icons (18 x 18 pixels) can be added to the toolbar.










That's It . . .

Sunday, May 19, 2013

Altium Leaving Access Connection Open - Bug

If Altium is connected to an Access Database using a DBLib connection, when Altium is closed, Altium exits without closing the connection to the Access database.

Example:

Note this bug also applies to Access 2007 and higher *.accdb databases.

Shown below an Access Database that is closed. This is an Access back-end database 'Parts_ORW.MDB' that will be connected to Altium using *.DBLib.






Next Altium is launched and connected to 'Parts_ORW.MDB' through ORW.DBLib.




After installing 'ORW.DBLib' using your file browser, you can see a 'Parts_ORW.ldb'. This is a database lock file, which is created by Access when the database was opened and connected to by Altium.






Next close Altium without un-installing the *.DBLib Library.

Using your file browser again, you can see 'Parts_ORW.ldb'. The database lock file, which was created by Altium when the DBLib was installed is still visible. The database connection was left hanging open by Altium.

Altium should close any connections made to Access databases when.

Altium is Closed.
When the DBLib Library is un-installed.
When the DBLib Library is De-activated.

You can cleanup after Altium by opening the database and closing it after Altium has been closed.

Related links:

Microsoft CloseConnection Method for Access

"The CloseConnection method is useful when you have opened a Microsoft Access database from another application through Automation" i.e. like Altium :)

Altium Bug Crunch #3761

That's It . . . 

Saturday, May 11, 2013

Altium Designer using Repeat Blocks in Schematics - YouTube

Altium Designer using Repeat Blocks in Schematics - YouTube:

'via Blog this'

Film too Small

Found on Linkedin 


1. Mario Irigoyen 


This is most likely due to some object(s) outside of the visble workspace.
First, try changing the film size: 
Open the Gerber dialog (File-Fabrication Outputs->Gerber Files) 
Click on the Advanced tab 
The default film size is 20000mil (20 inches) x 16000mil(16 inches), make them both larger, something like 36000 x 24000.

If that doesn't work. 

Try this:

Open the PCBList panel. 

In the upper left corner click on View and change to Edit, the rest of the blue text should read 'non-masked objects' Include 'all types of objects'. 

Reset the origin (Edit-Origin>Reset) 
The workspace extents are (X)100000 x (Y)64000. 

In the List panel click the column header 'X1' to sort on that column. 
Look for objects with negative values or values larger than X100000 
Repeat for the column 'Y1', look for negative or values larger than 64000

If you find objects with negative or values greater than the extents you can enter new values in the List panel to bring the objects into the workspace or dbl-click to open the properties dialog of the object.

2. Mike Harrington CID+ 

You may have an object (usually text) much outside you visible area on the PCB. Use select Edit-Outside Area and draw a box around your legitimate PCB and texting. Then look at you "PCB List Panel" - "All Objects" and look at the X - Y dimesions for something you can see in your workspace. Or just hit delete and blow away what is outside, but I like to know what it is and modify my X-Y to bring it back in to view.

This issue is very common with Altium, also the fix when the tool crashes during the use of a variety of commands.

Status Bar - Panic

Recently I managed to get my Status Bar in the not visible mode. Most likely I pressed V followed by S on the keyboard and toggled the Status Bar off.

I use V > D often, most likely I accidentally hit the S key when I meant to select the D key.

For me the Status Bar is a must have.  I'm surprised that users are allowed to toggle it off.











To toggle the Status Bar press V, then S.

Or you can Enable the Status Bar using the View menu as shown below.