Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Cadstar questions - attributes and report generator

Not open for further replies.


Junior Member level 2
Feb 13, 2013
Reaction score
Trophy points
Activity points
Hi all,

New to the forums, but a reasonably experienced Cadstar 11 user. A couple of questions though ;-)

- Does anyone know how to run a report using report generator that will extract attribute information for every part on a PCB? For example, in the library I might have attributes assigned to passives such as $Voltage or $Tolerance, how do you access those fields from within report generator?

- Another slightly related question, is it possible to set up parts in the library that have multiple fields (I guess attributes again?) for such things as manufacturer name, manufacturer part number, distributor1 name, distributor1 part number, distributor2 name, distributor2 part number, etc....? And again same as above, be able to extract this information using the report generator.

Thanks in advance!

BTW, I am "old school" and so still tend to edit the libraries manually with a text editor rather than using the Cadstar GUI interface.



that simple exemple ...

New Line
For Each Part
Part.Part Name
Part.Digi-Key Part Number.Text

as for question 2 i not sure to well understand
but you may add as mutch attribue you what

as ex:

.1730612 ;CONN TERM BLOCK 5.08MM 2POS
"1730612" (1)
*DFN 1730612
~PhotoURL (C:\Users\********\Zuken\CADSTAR 14.0\Library\tools\MFG_1730612.jpg)
~DatasheetURL (C:\Users\********\Zuken\CADSTAR 14.0\Library\tools\1730612.pdf)
~Price (2.01000)
~RoHS (Lead free / RoHS Compliant)
~Digi-Key Part Number (277-1284-ND)
~Manufacturer (Phoenix Contact)
~Price 100 (1.67950)
~Manufacturer PN (1730612)
~Description (CONN TERM BLOCK 5.08MM 2POS)
~Packaging (Bulk)
~MFG (Phoenix Contact)
~MFG_PN (1730612)
CONM (1)
CONM (1)

hope it will help on my side i made external application that sink my lib whit Digi-key ;-)

Best regard
Hi Marc

Thank you for your quick reply!

Your example works well. However, I also need the component reference (e.g. R1) as part of the report, but I don't seem to be able to get that with the "for each part" construct. I think maybe I need to use "for each component", what do you think? Basically I want to output both the component reference, part name etc.... as well as the parts attribute information (manufacturer and supplier part numbers etc.....) on the same line of the report. Is this possible?

This also got me thinking, does it matter or does it make any difference if you run the report with the .scm file open or with the .pcb file open?


Hi yes you need to add a "for each component" loop inside the part loop

and you will able to got the componet reference this way

you may try to edit the bom exemple that come whit cadstar as base

i prefer run report on pcb ,since on sch it need to be complete and error free (collation)
on pcb side that not need so it work bit better

Best regard
Marc .

- - - Updated - - -


i look on my own script and find someting that will help you

For Each Part Sorted by Part Name
Component.Count.Total Count
Part.Digi-Key Part Number.Text
Part.Part Name
For Each Component (Component) Sorted by Name
If Component.Fitted = Fitted
End If
New Line
Using Defined Origin

that extract a .csv formated to upload in Digi-key website for make bom
and it got attribue and component reference like you what to do ;-)

i really like cadstar scripting

Best regard

/me pulls up a chair and watches.

Have you forgotten your account pw Marc?

Now I know who I can pass any report generator questions to.

For the 2nd question, yes create them as "Part Definition" usage or if only ever for use with the report generator as "part library" and you can add as many as you want.

The more you have, the more data you enter then the more you can get out in a report.

Hi Mat

Have you forgotten your account pw Marc? umm not sure to understand ?

but was myself a cadstar newbie pass last 12 year whit P-Cad bu moved to cadstar only very recenlt
for now past vast majority of my time play whit report gennerator and ascii file format and .lib

i take that mind whit p-cad to play whit ascii file and make my own tool ;-)

so since i found that cadstar lack of good forum and you seem to be the only one that reply and active
i will try to do same if i able ;-) ,same for linkZ forum ..

p.s. did you the same Matt that on linkZ and quad....

Best regard

Thanks for the replies all

Hi Marc,
Thanks for the further example, I will give it a try. One last question - is there a way to create/edit .RGF files using ASCII as you pasted below? I looked at the RGF file format and it is ASCII text, but not in the format below. I think the answer is no, and you have to use the Cadstar GUI RGF editor ((

Hi Mat,
Thanks for your comments, could you clarify please exactly what you mean by <create them as "Part Definition" usage> and <"part library">? I presume you are referring to the attribute definitions in the .lib file?


Hi Marc, I think he means this Marc LOL, thanks for replying exactly what I would have put it.
I am marce here and use to be active on LinkZ as Marc England in the past, but now work near Matt (about 1 desk apart) LOL
I think two Marc's spelled with a c has confused our poor Matt.
Best Regards

Hi Waljit

RFG was not doccumeted (as far i knot) so need to use GUI
but GUI was good whit pull down menut it avoir to make to mutch error

you may also try whit OLE that fully documeted , look for \oleaut on same plate that output and lib directory
and have working bom extraction whit attribue here **broken link removed** (Xcell whit VBA scritp)

i just start whit OLE so i less familiar but seem atribue need to be visible for it work troug OLE
but possibility seem end less whit OLE ,almost all that may do on cadstar GUI was aviable as OLE commnad ;-)

Marce ya i see lot of helpfull post/reply on linkz from you and matt ;-)

Best regard
Marc L.

Yeah sorry guys, I had my confused head on.

Perhaps it's because I had spent the day in a very quite room and I managed to do lots of work - because Marc was not there to be noisy :lol:

Yes T5400, I was often using Linkz, I had a Yahoo group also.
If you have a problem in the UK and call support - chances are I will pick up the phone lol.

Waljit - Yes I was referring to the "attribute usage" for the attribute names.
Note: When creating attributes they MUST have the same attribute usage in all part files that use them.

I prefer to use the library editor for parts these days, I find it far superior now - able to copy single and multiple parts and all the checking etc make it IMHO a lot better. (Notepad still has it's place in fixing some human errors though.)


maby if you take call from canadian ;-)

Marc L.

Thanks for the replies everyone ))

One other question whilst I am here - does anyone know where cadstar stores the information for the file locations that is entered under TOOLS>OPTIONS>FILE LOCATIONS tab? I looked for files that changed when you changed settings in that tab, but couldn't find any. Maybe it is stored in the registry but that seems a bit OTT.

Reason - it would be really useful to be able to globally change this information in a text file, rather than having to manually edit each field with the GUI. Much quicker.


Workspaces are your friend here, I use them exclusivly and have done since 2002, so 10 years now. They work, and they control your working envoironment.


I am pleased to see that the workspace file .CSW is a nice ASCII text file that can be easily edited and copied for different designs ;-)

Yes, this is common practise.

Open the workspace and use search and replace to change a job name within filenames and paths etc.


Can i generate reports to extract Track length, track width (not code), track thickness(i think you get it in PR editor) for each trace and pad size in cadstar?
my requirement is to calculate weight of PCB with copper tracks and components and copper pour...

Thanks in advance..

I have been looking (briefly) at this recently and I think that the answer is simply no.

You get overall reports but I doubt that will help.

I wonder if you can use the scripting in PREditor to produce a report?
Not open for further replies.

Part and Inventory Search

Welcome to