I have not done any programming for 20 years, but did learn Pascal & C then.
Generally I struggle to learn something unless I have a purpose in mind so I have found one.
I want to read in a text library file for a CAD package and identify the symbols and components found in it.
Put them in a list/array and be able to output that list.
I then want to be able to read in another form of text library file and make a big list from that.
Then I want to compare the first list against the 3rd list and output the differences only.
Ditto the 2nd list to the 4th list.
So to start off I think I need the basic structure of the program (this does not seem to be identified in the tutorials - it used to be: declare variables, declare functions, main code etc).
Anyway I want to start by pressing a key to ask for the filename to be read in, open a browse window and read in the file.
The file will be have many instances similar to:
This is a part..SN54120D :1 ;D_DUAL PULSE SYNCHRONIZERS
*EXT 4 2 3 5 1 7 6
*EXT 12 13 14 11 15 9 10
4.1!I 2.1!I 3.1!I 5.1!I 1.1!I 7.0!N 6.0!N
12.1!I 13.1!I 14.1!I 11.1!I 15.1!I 9.0!N 10.0!N
Each new part/section starts with a full stop.
Althought there could be several similar lines such as:
at the top of a part.
And then the line I am looking for is immediately after them.
this is what I want to read into list 1 as the list of components.SO16 (reflow)
Then I want to look further and distinguish the symbols I.E. the
It may be duplicated a few times (as in the above example) or each one may be different.SYNC_120 (ANSI)
(so there is going to need to be a compare against existing symbols before adding it to the list.)
This will be list 2.
Then when I have all those read in I want to read in another couple of files, both in the same format to make lists 3 & 4.
I want to look for lines that are similar to:
where I want to extract the(SYMDEF L0 "CAPAE1030X1050N-modified" "" (PT 10000000 10000000)
where the component name is within parenthesis."CAPAE1030X1050N-modified" ""
The 2nd set of parenthesis may also be part of the name (the alternate name) I.E.
so may have content or may not."CAPAE1030X1050N-modified" "vertical"
I want to strip the parenthesis off.
If there is a 2nd name (alternate) then I want to enclose that in brackets so it looks like
as a single entry in the list.CAPAE1030X1050N-modified (vertical)
being 2 different components.
So once I have a list 1 of symbols, a list 2 of components, a list 3 of symbols and a list 4 of components.
I then want to be able to output each list as a .csv, then I also want to be able to compare list 1 and list 3 and output the difference into a .csv. The same for list 2 & 4.
I want to start with a simple text based screen program, get the functions right and then progress onto making a fancy gui version.
I want to be able to run this on a windows based PC only.
Now I think I know what I want & need to do, where do you suggest I start?
Is python going to be right for this or should I use VB instead?
Is this the place to get advice on this or is there another forum that would be better?