[SOLVED] Problems with Delphi Script Examples in Altium Designer 10

Status
Not open for further replies.

El Pollo Loco

Newbie level 3
Joined
Sep 16, 2011
Messages
4
Helped
17
Reputation
34
Reaction score
17
Trophy points
1,283
Location
Portland, OR
Activity points
1,320
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.

 

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.
 
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.
 

You can download the script examples here: **broken link removed**

They are no longer installed by default.
 

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.
 

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...

View attachment altium_scripts.zip
 
Thank you.**broken link removed**
 

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.
 
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..
 

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.

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);
 

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!
 
Hi all!
Totally newbie here!
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.ComboBoxLayers, Board); Reason: undeclared identifier
here is prntscr: https://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!
 

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!

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:
**broken link removed**
 

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.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…