+ Post New Thread
Results 1 to 15 of 15
  1. #1
    Newbie level 3
    Points: 978, Level: 7

    Join Date
    Sep 2011
    Location
    Portland, OR
    Posts
    4
    Helped
    17 / 17
    Points
    978
    Level
    7

    Problems with Delphi Script Examples in Altium Designer 10

    I am attempting to use the "Create Regions from Bitmap" example Delphi script which I used countless times in Altium Designer 9 to generate a graphical object on a board I am designing. I am aware that there is a separate "Logo Creator" script example that works in AD10 but it does not have as much flexibility as the "Create Regions from Bitmap" script. When I attempt to compile and run the script I get an "Undeclared identifier: SetupComboBoxFromLayer" error. A screenshot is attached. Has anyone out there experienced this before? I am very interested in fixing this script both for my own use and for the students I instruct in the use of Altium. I'm new to this forum so thanks in advance for helping out a noob.

    Click image for larger version. 

Name:	script_error.png 
Views:	72 
Size:	48.6 KB 
ID:	61579

  2. #2
    Newbie level 3
    Points: 978, Level: 7

    Join Date
    Sep 2011
    Location
    Portland, OR
    Posts
    4
    Helped
    17 / 17
    Points
    978
    Level
    7

    Re: Problems with Delphi Script Examples in Altium Designer 10

    This turned out to be a pretty easy fix actually. All I had to do was locate a copy of the file "LayerComboBox.pas" from one of the other example script folders (there is a handy copy in the \Delphiscript Scripts\PCB\PCB Logo Creator directory). I copied the file to the \Delphiscript Scripts\PCB\CreateRegionsFromBitmap directory and then opened the PCBPictureCreator.PRJSCR in Altium and added the copy of LayerComboBox.pas to the project. Recompile then run and it works like a champ. Hopefully this helps someone else before they pull out their hair.


    1 members found this post helpful.

  3. #3
    Newbie level 2
    Points: 419, Level: 4

    Join Date
    Aug 2010
    Posts
    2
    Helped
    0 / 0
    Points
    419
    Level
    4

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Where do I find the Delphi Scripts for Altium Designer 10? There is no Examples/DelphiScripts folder that exists after I installed Altium Designer 10.



    •   AltAdvertisment

        
       

  4. #4
    Newbie level 3
    Points: 978, Level: 7

    Join Date
    Sep 2011
    Location
    Portland, OR
    Posts
    4
    Helped
    17 / 17
    Points
    978
    Level
    7

    Re: Problems with Delphi Script Examples in Altium Designer 10

    You can download the script examples here: Script Examples Gallery Reference - English documentation - The Altium Wiki

    They are no longer installed by default.



  5. #5
    Newbie level 1
    Points: 436, Level: 4

    Join Date
    Mar 2012
    Posts
    1
    Helped
    0 / 0
    Points
    436
    Level
    4

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Hi El Pollo Loco,
    in the link you indicate there's no way to download script projects.
    Could you tell me where i would download PCB logo project.
    Thank you.



  6. #6
    Newbie level 3
    Points: 978, Level: 7

    Join Date
    Sep 2011
    Location
    Portland, OR
    Posts
    4
    Helped
    17 / 17
    Points
    978
    Level
    7

    Re: Problems with Delphi Script Examples in Altium Designer 10

    I tried to attach a zipped archive of the Altium scripts to this post (hopefully the forum admins give it their blessing). It looks like the download link was pulled down from Altium's confluence wiki. This might be the last convenient place on the internetz to get them...

    altium_scripts.zip


    16 members found this post helpful.

    •   AltAdvertisment

        
       

  7. #7
    Newbie level 3
    Points: 156, Level: 2

    Join Date
    Mar 2012
    Posts
    4
    Helped
    2 / 2
    Points
    156
    Level
    2

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Thank you.



    •   AltAdvertisment

        
       

  8. #8
    Newbie level 3
    Points: 180, Level: 2

    Join Date
    Jul 2012
    Location
    Calgary, Alberta, Canada
    Posts
    4
    Helped
    6 / 6
    Points
    180
    Level
    2

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Thank you for the scripts, El Pollo Loco! I think you're right -- this is the only place they seem to be available. I'm banging on Altium as to why the scripts have disappeared in Altium Designer 10 and above, even though their Wiki discusses them.


    1 members found this post helpful.

  9. #9
    Junior Member level 1
    Points: 881, Level: 6

    Join Date
    Nov 2008
    Posts
    16
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Great Thread by you guys El Pollo Loco & Engenuics thanks for the effort. How to use the Script , can you tell me how to run it, suppose I want to stamp logo to my schematics..



  10. #10
    Newbie level 3
    Points: 180, Level: 2

    Join Date
    Jul 2012
    Location
    Calgary, Alberta, Canada
    Posts
    4
    Helped
    6 / 6
    Points
    180
    Level
    2

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Quote Originally Posted by shelsd96 View Post
    How to use the Script , can you tell me how to run it, suppose I want to stamp logo to my schematics..
    Here is a pdf of the section in our Altium course notes that has the instructions along with details of the clipboard method of getting an image in. Hope that helps!

    Engenuics Logo Import Instructions.pdf


    3 members found this post helpful.

  11. #11
    Newbie level 1
    Points: 13, Level: 1

    Join Date
    Jan 2013
    Posts
    1
    Helped
    0 / 0
    Points
    13
    Level
    1

    Re: Problems with Delphi Script Examples in Altium Designer 10

    I am new to this process so please excuse my ignorance.
    I thought I would try adding graphics to the pcb layouts I am doing, but this is a lot more work than I thought it would be.
    I would like to thank Engenuics for writing such a helpful document. Altium documentation is the worst I have seen.
    The Altium documentation will tell you that something can be done, but not how to do it.
    Anyway, I tried to run the script but it errors out.
    Click image for larger version. 

Name:	Altium 10 Delphi Script Problems.jpg 
Views:	39 
Size:	102.6 KB 
ID:	86122
    Any help is greatly appreciated. Thanks

    - - - Updated - - -

    Sorry the *.jpg did not work out.
    Double monitors.

    The error says: ; expected

    The line where the error occurs: GrayWidth := Round ()1 - sqrt(GrayProportion)) * PixelToCoordScale / 2);



  12. #12
    Newbie level 3
    Points: 180, Level: 2

    Join Date
    Jul 2012
    Location
    Calgary, Alberta, Canada
    Posts
    4
    Helped
    6 / 6
    Points
    180
    Level
    2

    Re: Problems with Delphi Script Examples in Altium Designer 10

    a9morris,
    I can see the jpg ok. The only thing I notice is that you do not have ConvertPicture.Pas script selected (it's the last in the list of four source documents -- you have the top one highlighted instead). Left-click ConvertPicture.Pas and make sure it is highlighted in blue. Then click the Run button. I think this will run the correct script.
    Lemme know if it works!


    1 members found this post helpful.

  13. #13
    Newbie level 1
    Points: 13, Level: 1

    Join Date
    Feb 2013
    Posts
    1
    Helped
    0 / 0
    Points
    13
    Level
    1

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Hi all!
    Totally newbie here! :D
    Getting grip with AD10, and trying that logo to PCB.

    First of all: extraspecial thnx to Engenuics! I wish you put out your "Altium course notes complete draft.docx" ASAP, cause you explain it so simple as it is child play.
    Thnx man! Thnx a lot. If there's link somewhere - please let me know.

    So, like a9morris I got stuck on script. At first I saw that there's no any layer to choose from drop down menu.
    But still give it a try... (stubborn prick - me)
    Script stopped @ SetupComboBoxFromLayer(ConverterForm.ComboBoxLayer s, Board); Reason: undeclared identifier
    here is prntscr: http://obrazki.elektroda.pl/5746191100_1360618830.png
    Well I know what it means (in term only), but can't figure out how to fix it...but that's not strange thing for a newbie.
    Any advice/help - I'll appreciate it.
    Thnx in advance! :)



    •   AltAdvertisment

        
       

  14. #14
    Newbie level 3
    Points: 180, Level: 2

    Join Date
    Jul 2012
    Location
    Calgary, Alberta, Canada
    Posts
    4
    Helped
    6 / 6
    Points
    180
    Level
    2

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Quote Originally Posted by the_koki View Post
    So, like a9morris I got stuck on script. At first I saw that there's no any layer to choose from drop down menu.
    I think your problem is different than a9morris (I'm not sure if s/he was able to solve their problem). If you do not have any layers showing in the drop-down list of the dialog box, then something else is wrong and unfortunately I'm not sure what it could be. I tried a few things but could not re-create the error that you show. My only suggestions:
    1. Open a .PcbDoc file, place and route a few random components and make sure that everything is working in terms of layers showing up.
    2. Repeat the steps in the tutorial document very carefully using a simple .bmp image

    Hopefully it works for you!

    Quote Originally Posted by the_koki View Post
    I wish you put out your "Altium course notes complete draft.docx" ASAP
    Sorry, that document is proprietary for a paid industry course. We will be launching a free version of our Altium course sometime in the next few months via our university program. You can keep an eye out for it here:
    http://www.engenuics.com/mpghome.php


    1 members found this post helpful.

  15. #15
    Newbie level 1
    Points: 1,853, Level: 10

    Join Date
    Dec 2003
    Location
    Poland
    Posts
    1
    Helped
    0 / 0
    Points
    1,853
    Level
    10

    Re: Problems with Delphi Script Examples in Altium Designer 10

    Quote Originally Posted by the_koki View Post
    Hi all!
    So, like a9morris I got stuck on script. At first I saw that there's no any layer to choose from drop down menu.
    But still give it a try... (stubborn prick - me)
    Script stopped @ SetupComboBoxFromLayer(ConverterForm.ComboBoxLayer s, Board); Reason: undeclared identifier
    here is prntscr: http://obrazki.elektroda.pl/5746191100_1360618830.png
    Hi,
    You must open Project from File/Open.. NOT ONLY THE SCRIPT FILE as free documents.
    Then comile whole project (2 files) and run script. All will be works fine.



--[[ ]]--