Print Page | Close Window

Altium Script Recommendation

Printed From: PCB Libraries Forum
Category: PCB Footprint Expert
Forum Name: Product Suggestions
Forum Description: request new features
URL: https://www.PCBLibraries.com/forum/forum_posts.asp?TID=1584
Printed Date: 22 Nov 2024 at 5:06am


Topic: Altium Script Recommendation
Posted By: robmeyer
Subject: Altium Script Recommendation
Date Posted: 03 Mar 2015 at 1:41am
Hello,

I have one comment to the Altium Script feature.

Altium recommend to use pre and post processes in scripts with PCBServer usage.

So it would be nice to see in the CreateComponent Procedure this processes. For example:


Procedure CreateComponentSOD2613X115N;
Var
    NewPCBLibComp               : IPCB_LibComponent;
    NewPad                      : IPCB_Pad2;
    NewRegion                   : IPCB_Region;
    NewContour                  : IPCB_Contour;
    STEPmodel                   : IPCB_ComponentBody;
    Model                       : IPCB_Model;

Begin

    Try
    PCBServer.PreProcess;
    NewPCBLibComp := PCBServer.CreatePCBLibComp;
   
..............

    CurrentLib.RegisterComponent(NewPCBLibComp);
    CurrentLib.CurrentComponent := NewPcbLibComp;

    Finally
    PCBServer.PostProcess;
    End;

    CurrentLib.Board.ViewManager_FullUpdate;

    Client.SendMessage('PCB:Zoom', 'Action=All' , 255, Client.CurrentView)
End;



It's not a big deal, but would be nice to see.

Robert



Replies:
Posted By: robmeyer
Date Posted: 03 Mar 2015 at 4:53am
Also nice to have would be this short entry in the prjsrc file.

For example:

[Generic_ScriptingSystem]
StartProcName=SOD2613X115N.pas>CreateALibrary


Robert


Posted By: chrisa_pcb
Date Posted: 25 Feb 2016 at 9:45am
If using Post Process Scripting, simply click 'Use Post Process Script' and save it as a preference.
 
The prjsrc mod doesn't seem to gain anything. This pops the prj/pas files into the left window, right? But to actually run the script I still need to go DXP -> Run Script, so what do I gain other than confusion? If I see the files pop in the window, I expect to be able to do something with them, and I'm not seeing that. I'd like to keep the process as confusion free as possible but if you can convince me of the benefits i'll do it.



Print Page | Close Window