Author Topic: Altium File Structure Questions?  (Read 9227 times)

0 Members and 1 Guest are viewing this topic.

Offline futura2012Topic starter

  • Newbie
  • Posts: 9
Altium File Structure Questions?
« on: December 21, 2014, 08:47:39 am »
Hello Board

Few more questions in relation to Altium. I am really struggling understanding how it uses files and the logic of the file structures within Altium.


This is the basic structure in Altium I am currently using (14.2.5)

(1) Altium Project File

SUB (1) Source Document

Schematic Diagrams
PCB Diagrams

SUB (1) Libraries

Schematic Library
PCB Library



If you save a project for example FILE > SAVE PROJECT AS - Does this save everything? or just the file structure then you load all the documents etc separately?

I am having no end of problems with Altium either trying to save multiple things if you click on save project or sometimes it complains about not being able to find stuff. Sometimes it just seems to save and there is no attempt to save any other files.

If you create a component in the schematic library is it possible to save this as just an individual component or is this embedded in the schematic library you are in? If you can save it as an individual component how do you do this? also where is it saved to?  The same question applies to how I save a footprint say a particular way I want to draw an 8 pin SOP how do I blanket copy this into other projects or store it for other projects?

If you are in Schematic Library for example and click on save i assume this then saves the particular schematic component you have drawn in the relevant schematic library you are in at that moment?  Say if you wanted this particular component featured in another library how do you get it out of the library you are in and into another?

What is the difference between a compiled library and a library document? Of course I understand the concept of compiled code and non compiled code but I am struggling understanding what this exactly means. I assume the library needs compiling in some way but not sure why or how? Through various processes I am doing in online tutorials I get compiled libraries appearing I am not sure quite how or what they relate to?

How do you differentiate between a component library and a footprint library? For example i have the Altium Unified Components Library files I found online in their is Analog Devices and Texas Instruments. There seem to be plenty of components in there but I am damned if i can find any foot prints. I'm not sure if its something I am doing wrong or there just are no footprints in there? Although this would seem weird > what is the point in a library of this size with no footprints?  Maybe the footprints are separate and i'm just not understanding the concept.


Would really appreciate it if someone can explain how this works.  I have been through numerous tutorials now and keep hitting dead ends. I have tried searching in Google and no joy.

I just cant seem to get the relevant things to come up as needed for example footprints, schematic component etc. I also cant seem to get things to save properly or at least I feel I have no control over it.
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Altium File Structure Questions?
« Reply #1 on: December 21, 2014, 06:41:32 pm »
Look closely in the tabs of each of your open files. Next to the filename will be an asterisk * if the file has been modified since it was saved.

Saving only affects the current document. Use Save All every now and then. You will see the * go away when a document is saved.



You can see i have added a library to the project, but the small shortcut icon in the corner means it's referenced, not strictly part of the project. I do this to share my library between all the projects.
Separate SchLib/PcbLib are necessary to edit as you go.
You can at any time package these into an IntLib (integrated library) but it cannot be edited without exploding back into two pieces.

Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Altium File Structure Questions?
« Reply #2 on: December 21, 2014, 08:20:34 pm »
Hello Board

Few more questions in relation to Altium. I am really struggling understanding how it uses files and the logic of the file structures within Altium.

altium has its own filemanager. don't try to outsmart it and throw spanners in there. let the tool do its thing.
an altium project is a collection of files in the windows filesystem. the PCBPRJ file holds the links to the other files in the project. when you open the project altium parses that file ( plus a settings file) and shows you the project tree. Note that hwat you see in that project tree is NOT the layout in the windows file system. files can reside in totally different physical locations. but you don't need to care about that.

Quote
If you save a project for example FILE > SAVE PROJECT AS - Does this save everything? or just the file structure then you load all the documents etc separately?
no it doesn't, that only renames the prjpcb file. nothing else is touched. all documents in the project stay where they are.

Quote
I am having no end of problems with Altium either trying to save multiple things if you click on save project or sometimes it complains about not being able to find stuff. Sometimes it just seems to save and there is no attempt to save any other files.

wrong command.  do save-all. that saves all modified documents.

Quote
If you create a component in the schematic library is it possible to save this as just an individual component or is this embedded in the schematic library you are in? If you can save it as an individual component how do you do this? also where is it saved to?  The same question applies to how I save a footprint say a particular way I want to draw an 8 pin SOP how do I blanket copy this into other projects or store it for other projects?

parts are created in the current active library ( the open document, look at your title bar to see the name and path of the windows filename ).
you can create libraries with only one component but that is silly. the idea of a library is so you can browse it easily.

copying in and out is the same as with anything . click on the part in the library browser , hit ctrl-c ( or right click and select copy ) , then go to another library document and do paste there.

looking at your question it seems you do not know how to use your library. lemme explain :

you create a new library 'mylib.schlib' and store it in 'my documents\altium\my library\'
you make symbols in that library. you can store thousand of different parts in that one single file.

now, to use that library i am betting you open this all the time for each and every project ... that is not the correct usage.
you need to add the library to your component browser.

open a schematic sheet and place a part. ( p-p). click the 'choose' button.
that window that now opens is the library browser. this browser can have multiple libraries open at the same time. you select the library from the pulldown menu.
to add your library in there click the three dots ...  and a new window opens stating the available libraries.
it shows your porject libraries but also your installed libraries. click on the' installed' tab

add your file mylib.schlib from  'my documents\altium\my libraries' in that list ( click the install button at the bottom and do install from file. a windows filesystem navigtor opens , pick the file and done.
altium stores this in the system settings so now that library is available for every single project you make.

now, it goes beyond that.

typically you do not add individual schdoc or pcbdoc file. you create an integrated library.

this is a special project , just like a pcb project.
in that project file you create mulitple schlib and pcblib documents. one foo resistors, one for caps, one for transistors and so on. split it as you like.
all these documents and the intlib project (the prjlib file) are stored in one windows folder.

when you compile the library: project - compile altium collects all these files, creates the links between symbols and footprints and possibly simulation models,  3d models and whatnot and builds a single output file with extension intlib.  this is essentially a relational database structure with search indexes pre-built. meaning , when you pick a part altium doesn't have to deal with tthe windows file system to try and find all data in 5 different files in 5 different locations to get to the data it needs. it pulls an index in the intlib file and everything is right there.

now, THAT intlib file is what you add to that library menu i described earlier.

the nice advantage is that this is a relational link. meaning : whenever you add parts to such an intlib and you hit 'compile' the altium library browser is up to date. your parts are ready for the use.
you can even share such intlibs over a network with multiple users. you are working from a live database.


Quote
How do you differentiate between a component library and a footprint library?
schlib and pcblib.

and integrated library has both.

intlib is a database structure holding everything.


Quote
For example i have the Altium Unified Components Library files I found online in their is Analog Devices and Texas Instruments. There seem to be plenty of components in there but I am damned if i can find any foot prints.


they are in there. every schematic symbol is linked to a footprint already for you. once you go to the pcb document they will appear. the schematic viewer can only show the symbol , the pcb viewer only the footprint. the intlib has both.

to be able to browse what is in there you need to explode the intlib back to source docuemnts. you can do that. altium will open the intlib and create a schlib and pcblib from it for you.

Quote
I also cant seem to get things to save properly or at least I feel I have no control over it.
that is the mistake : do not try to force altium to work your way. leave the control over where files are stored to altium. by default it stores all files in the same directory as where the project file is saved. don't muck about trying to create subdirectories of your own and muddling about with trying to organise them in the windows file system. Organise them in altium. leave the physical storage to altium. especially if later you want to do things like project archival , integrating with version control systems and possibly the vault.

And NEVER-EVER move files using windows explorer. Altium uses relational links. start moving stuff behind its back and you will get that 'file not found' problem. altium does NOT look in the windows file system to find files. it looks in the pcbprj file. the prjpcb has the path for each document into the windows filesystem.  if that path is broken because you fudged around : file not found.

that path does not need to be a local file. it can be a file on a network , someone elses computer, a server or even a vault somewhere. this allows sharing of data across design groups.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline futura2012Topic starter

  • Newbie
  • Posts: 9
Re: Altium File Structure Questions?
« Reply #3 on: December 23, 2014, 02:44:35 am »
hello marshallh and free electron

I just want to say really big thanks for your help here :)

I am now going through everything you have mentioned to me and learning fast.

I just wanted to say THANK YOU so it doesnt take me ages to respond to your posts.

I will post back soon with any questions.

As you can imagine i am happy!!  starting to understand this program and ITs POWERFUL :) :)
 

Offline futura2012Topic starter

  • Newbie
  • Posts: 9
Re: Altium File Structure Questions?
« Reply #4 on: December 23, 2014, 04:28:34 am »
Quote
Look closely in the tabs of each of your open files. Next to the filename will be an asterisk * if the file has been modified since it was saved.

Saving only affects the current document. Use Save All every now and then. You will see the * go away when a document is saved.

Thanks for taking the time out to make that screen shot. Info about the asterix and save ALL makes sense too. So just to clarify if I click save all then this saves the Project File and all other files such as PCB, Schematic, Schematic Library, PCB Library etc?

Quote
You can see i have added a library to the project, but the small shortcut icon in the corner means it's referenced, not strictly part of the project. I do this to share my library between all the projects.
Separate SchLib/PcbLib are necessary to edit as you go.
You can at any time package these into an IntLib (integrated library) but it cannot be edited without exploding back into two pieces.

This is basically what I want to do. Rob elements from the Altium libraries but not use an entire Altium library as they are what i would describe as total BLOATWARE so much information that seems very confusing and badly indexed.  Some footprints i want, some 3Ds I want so I think I need to do as you describe some how make reference libraries but not sure how you do this?

Quote
altium has its own filemanager. don't try to outsmart it and throw spanners in there. let the tool do its thing.
an altium project is a collection of files in the windows filesystem. the PCBPRJ file holds the links to the other files in the project. when you open the project altium parses that file ( plus a settings file) and shows you the project tree. Note that hwat you see in that project tree is NOT the layout in the windows file system. files can reside in totally different physical locations. but you don't need to care about that.

makes sense about it having its own file structure so I see what you mean about dont move stuff around in Windows.  but.. if i think of analogy here I use a music sequencing program called cubase it uses various files some audio files such as WAVs some midi files for note placement, some internal synths etc. Now when i am writing a track I often say browse google grab samples from youtube etc so you end up with files in various places.  I have made the mistake before of leaving everything where it is as you describe this is fine as long as those files remain where they are but if for any reason anything gets moved, trashed, damaged etc cubase will complain and not be able to load up the complete project.  I have found by understanding how it uses these files and getting them all in one place it makes life a lot easier to prevent this kind of thing from happening.   Now of course sounds like Altium wont tolerate any windows movements so that is okay. lets play by the rules but how do you collate all this data within altium say to have all the relevant libraries etc to one folder?

Quote
no it doesn't, that only renames the prjpcb file. nothing else is touched. all documents in the project stay where they are.

I think I am clear here so if I choose to save the project for example (highlight the project file) click SAVE  OR File > Save project as then all I am doing is saving the Reference points to the relevant files?  In a sense the project file is a coordination/location file (for all the other files) is this understanding correct?

Quote
wrong command.  do save-all. that saves all modified documents.

Again just to clarify if i click File > Save ALL then i will save the Project File (effectively the master file) + all the linked files to the project file. Is this understanding correct?

Quote
parts are created in the current active library ( the open document, look at your title bar to see the name and path of the windows filename ).
you can create libraries with only one component but that is silly. the idea of a library is so you can browse it easily.

copying in and out is the same as with anything . click on the part in the library browser , hit ctrl-c ( or right click and select copy ) , then go to another library document and do paste there.

I will do a run through please refer to below:

(1) Ensuring tab in bottom left is set to display "projects". Clear all the project files.    Start Again >  File>NEW>Project>PCB Project
 Now right click PCB_Project1.PrjPCB  now Add new to project>PCB  then I repeat this for PCB Library  Schematic and Schematic Library.  So in other words i now have a PCB Project file linked to a PCB, a PCB Library, a Schematic and a Schematic Library.

(2) I have created in the schematic library page a Simple oval shape labelled test1, now if I click on the SCH Library tab in the bottom right this will display as a component in the schematic library.  I now click on add and create another component this time a square labelled test2. Illustrated:



^^ At this point all is good. I see above test 1 the 4 relevant files in question PCB, PCB Library, Schematic, Schematic library. In my SCH Library Tab (the left hand side browser) you can see Component 1 (an Oval Test1) and Component 2 (a square test2).

So I now highlight component 1 and of course the oval appears. i now want to add a footprint. This is where the confusion begins. 

So Tools>Component Properties bottom right of screen there is a box "models" beneath this ADD>drop down FOOTPRINT

At this point no footprints. Solution system cannot of course find anything okay lets find something. 

Footprint model box at top > Hit browse.

Libraries Blank

Masks Blank

Click on the (...) symbol between the drop down and find.

> this load of red stuff appears.



^^ this is the kind of thing I keep getting by not understanding the file structures. Ie where is? and how is? stuff stored???

of course this relates to stuff altium cannot find hence the red colour and the wtf reaction from altium.  But why is altium looking for this stuff as I am in a totally new project and have not yet started / chosen any libraries!

also how do i get rid of all this mess/warning stuff in red?

So now I try and move on.  I look in this box (with all the red stuff) and see I am in a tab relating to Installed.  beneath this titled "installed libraries".  So my next instinct is to move over to project tab.

I highlight the schematic library in the list (as this seems the logical thing to do).   I then click ADD Library.  I am in the unified components library storage I now have on my CD Drive D:\Unified Components\Texas Instruments



No footprint libraries to be found. However i want an 8 pin SOP which I know is in this library somewhere?  How do I find it? How do i get the 8 pin sop into this schematic?

I could of course go on and on with this.  Red stuff appearing, loss of files, Blank library drop downs,  Irrelevant libraries only available etc etc.  I also notice footprints will randomly appear in the library if you make a new one.

I think my problem lies with a total lack of understanding of how the files structures work.  Perhaps better wording would be how the indexing system works?   In my opinion it is extremely hard to understand. 

Fortunately with the help I have had so far I have been able to move on with the Youtube tutorials etc but i am currently very reluctant to move ahead with creating components etc as all I ever seem to do is lose them and create red warnings and complaints from altium,

Quote
looking at your question it seems you do not know how to use your library

I definitely dont. I think perhaps rather than using the word file structures i should use the word library structures but i effectively mean the same thing.   Where is stuff stored, how is it stored, how is it indexed, how do you allign everything to one project etc.

Quote
you create a new library 'mylib.schlib' and store it in 'my documents\altium\my library\'
you make symbols in that library. you can store thousand of different parts in that one single file.

bit of confusion here at first but on my machine (WXP SP3) it is in C:\Documents and Settings\All Users\Shared Documents\Altium\AD14\Library

Now looking at this I assume if i point that box (i showed)  moaning with the red stuff and point it here then the red will go away and all the stuff will go black right?  Still wondering why all this stuff is listed in the first place?

i also note it sais "Library" not "My Library" as you describe.  Maybe this does not matter?

Quote
now, to use that library i am betting you open this all the time for each and every project ... that is not the correct usage.
you need to add the library to your component browser.

I am actually so confused thus far i have not even established a method to add a library in a project.  So far i am just thankful I can now follow the youtube tutorials as i can learn whilst I am getting this kind help from people like yourself :)

Quote
open a schematic sheet and place a part. ( p-p). click the 'choose' button.

Yes in the tabs at the top of the screen select the Sheet1.SchDoc.  Go to top right of screen click on the resistor symbol>drop down>left click 1K resistor.  Pull over on screen press left button (once only! or all hell breaks lose) and then right click to prevent any more replacements.   

Just an aside!! >> is there any way of turning off this constant component placement function? in other words if I left click the resistor multiple times it will of course place several.  I find sometimes this feature is useful but more often than not it is a total pain. Wondering if you can axe it in any of the Altium options? <<

Quote
that window that now opens is the library browser. this browser can have multiple libraries open at the same time. you select the library from the pulldown menu.

I assume here you are referring to the side tabs on the right.  The one labelled Libraries. lets see what happens.  As predicted my pull down menu is totally blank at this point.  Click on search the nasty database search thing appears.  i axe that go to libraries and the same box appears with all the red stuff again.   

A pattern is emerging here.  I think the problem is more isolated than I think? I suspect by now you can see what muppet moves I am making :D

Quote
to add your library in there click the three dots ...  and a new window opens stating the available libraries.

If I click the "..." I just get Components, Footprints, 3D models appearing. No other option.

Quote
it shows your porject libraries but also your installed libraries. click on the' installed' tab

I think at this point I will let you have a chance to reply as I think all this problem is evolving around one major mistake I am making. I am also trying to structure my questions so other newbies can understand if they are having the same issues.   for now I will bow out so this does not become too long of a post.

Once you have replied I will go through all your other points if there is any further areas of confusion.

BTW - i have said this before but THANKS for your HELP.  I know it takes time to respond to these things and i really do appreciate it :)

I think your responses will help others too as this particular issue is not covered in Youtube and trust me i have been looking!!

regards







 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Altium File Structure Questions?
« Reply #5 on: December 23, 2014, 05:39:58 pm »
ok, i think i see what the problem is.

lemme start of by explaining something you need to know about altium. Altium is a tool designed for multiuser environments and is all about design re-use. Whether schematics, libraries , layouts. doesn't matter. that does not mean it is not usable for a single install by a single guy. You just need to be aware how the tool 'partitions' things. this partitioning is done because it allows multi-user environments ( to give you an idea : where i work we have over a hundred licences , some users have static licences , like me since i use this all day long , some users are on floating licences. The total user base in the company is well over 300 people. )

so stuff has to be structured to allow collaboration.

knowing that, here is how you use altium ( irrespective if you are single user or multi-user )

1 ) leave the installed libraries that come with altium where they are. you can use them but do not modify those. treat them as if they were under control by someone else ( in this case altium )
2 ) make your own library and store YOUR stuff in YOUR library. you do whatever you want in that one.

in a collaborative environment everybody has his own library with stuff he made and other 'link' to that library. my collegues can see my library and i can see all of theirs. the rule is : hands off each other libraries , modify only your own.  ( this concept carries over to the vault )

Now, to rectify your problems and get you up and running with altium we need to do a few things.

first of all:
in your documents folder : make a folder called altium
inside that altium folder make two folders : one called 'My Library' one called 'My Designs'

Now , launch altium. File -> New -> project  and select 'integrated library'
Hit Browse location and navigate to that My Library folder you created. Make sure the 'Create Project Folder' checkbox is empty ! click OK

you will get an empty project called integrated_library.libpkg

right click that name and select 'add new to project' and select schematic library
right click the libpkg again , select add new to project' again and select pcb library

now go to 'file' -> Save All

Altium will prompt you for file names now. in my case it asked for the PCBlib filename first. Call that one 'General.pcblib' and click save.
next it asks to save the schlib. give that also the name 'general' but with extension '.schlib'

lastly it will ask to save the project. call that one MyLibrary.LibPkg'

now you can start adding parts and footprints to those libraries.

you can open other libraries you already made, select parts , right click => copy , go to the general.schlib , right click in the column and do paste.

you can also select components from an existing schematic , do copy , go to the schlib and do paste there. they will appear.

the same goes for pcblib and pcb copying . simply select the ones you want, copy , go to the general.pcblib and do paste the components column

once you have done a few. hit file -> save all

Now, we are going to build the intlib for the first time

go to Project -> compile integrated library. this will create a new subfolder where your library files are stored . in there you will find the intlib.
do NOT touch that, do not move it. leave it be. i am just telling you where it is. don't mess with it.

open a schematic sheet.
place - part , click choose , in the new window , click on the three dots ...  ( look at the top it says libraries with a combobox. in theat combobox , at the right there is a down arrow and then three dots. click on those )

a new window will open. click the installed tab.
click the install button select from file , browse to 'my documents\altium\my library\output files\ and select that .intlib file
click ok and close all the open windows.

The schematic tool now knows to use that intlib when you want to place components.

ther eis a similar process for the pcb edito.

open a blank pcb place component click three dots , point to file and done.

whenever you create new parts in the library you simply do projects - recompile intlib and they become available for the schematic and pcb.

now , when you create a schematic symbol and you click 'add footprint' it will pick up the footprints from the .pcblib in your library project.

to get a running start : download my master library from www.siliconvalleygarage.com

that is an intlib. make a folder called SVGlibrary under my documents\altium and throw the intlib there.

double click the intlib , altium will launch and ask if you want to extract the files. say 'yes'
you will see that my intlib contains many schlib and many pcblib documents. you can do the same.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf