Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

 All Forums
 Help with using Pulsonix
 Scripting
 Change Shapes, Styles, Areas in Footprint

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON

   Upload a file

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Martin Posted - 20 Jul 2018 : 11:28:15
Hello,
I want to write a script in JavaScript that automatically changes / corrects LineStyles, TextStyles and changes a DocShape to an Area.
Reason is that I use Library Expert to create footprints but the LineStyles and TextStyles never match with my Styles from the Technology and the courtyard is always just a DocShape but not an Area. It is always time consuming non-productive work to change those Settings manually and you may forget to do something.

As the Scripting Help says I may have to use FileHelper Objects to Access the Library but I cannot figure out how or if it is possible at all. I can choose a LibFile but how do I open it and get Access to each footprint?
The Help focuses on Reports and Design but no useful Information about Library.

Does anybody have an idea, hint or experience doing this or anything similar?
May there be a better way to do so than scripting?

Of cause I can use Macro but it may not be that general and as I import a whole Lib this is also time consuming doing it for each part than doing it once for the whole lib.

Thanks in advance and nice Weekend to all.

Martin
9   L A T E S T    R E P L I E S    (Newest First)
Martin Posted - 25 Jul 2018 : 09:46:39
I sent an Email to PCB Libraries if they are able to fix some aspects. If not I will ask Pulsonix. It is quite difficult to understand that Pulsonix is able to Import 3rd party files better than the format that seem to be the proper exchange format. Importing all lines on a Placement Layer as Area would easily fix one of the issues.
As the use of Layer matching the use of matching text styles, line styles etc. could fix the next issue. Other aspects Need a deeper look.

Thanks to Jochen. What a shame that we cannot Access to Change Shape to Area. So Scripting will fail to help too.

So we stay manually at least but I let you know if I get an answer of PCB Libraries.

Martin
cioma Posted - 25 Jul 2018 : 09:27:15
Well, Pulsonix footprint may be saved in .pfp file but it's binary. If only it was ASCII like in KiCad :)
Jochen Posted - 25 Jul 2018 : 08:14:48
Hi,

you can access the footprints in a library by scripting easily. But you cannot change the type of a shape from doc shape to a area there nor you can add an area.
My suggestion is to try another export format, you can try Eagle. When importing a Eagle library in Pulsonix, areas with the body flag are added.

Jochen

quote:
Originally posted by Martin

Thank you for the advice. Yes, it seems that the P-CAD file does not Support linestyles as used in Pulsonix. I sent an Email to the guys of PCB Library if it is possible to set the Placement Outline from DocShape to Area.
But I guess you are right. The more I look into the deepness of those files I figure out that you need the functionality of Pulsonix to get Access to all the required Settings. So scripting will be probably the best way.

Maybe the Pulsonix People can help out how to access the footprints in the Library and its settings by scripting (JavaScript)?
Maybe they would like to enter and answer this thread... please.

Regards, Martin

Martin Posted - 24 Jul 2018 : 13:44:07
Thank you for the advice. Yes, it seems that the P-CAD file does not Support linestyles as used in Pulsonix. I sent an Email to the guys of PCB Library if it is possible to set the Placement Outline from DocShape to Area.
But I guess you are right. The more I look into the deepness of those files I figure out that you need the functionality of Pulsonix to get Access to all the required Settings. So scripting will be probably the best way.

Maybe the Pulsonix People can help out how to access the footprints in the Library and its settings by scripting (JavaScript)?
Maybe they would like to enter and answer this thread... please.

Regards, Martin
cioma Posted - 24 Jul 2018 : 09:49:03
Mind you that PCBL PLX file format is actually P-CAD ASCII file format: http://www.eurointech.ru/products/Altium/PCAD_2006_ASCII.pdf

And I'm not sure if it has an entity to support Pulsonix area type of object. So probably scripting in Pulsonix is the only way to do what we need.
Martin Posted - 24 Jul 2018 : 07:32:53
Hello,

I tried the Setting in Library Expert and it help that LibExpert does not generate a new Line Style if it finds a match in the Technology (multiple LineStyles with same width) BUT it does not find the proper Line Style. While Import Pulsonix matches the first Line Style which has the same Thickness. For example a Silkscreen Outline is matched to Line Sytle "Wire" which is wrong but matches the same Thickness.

Anyway still the correct Translation of the Placement Outline / Courtyard is not correct. It will be imported as DocSymbol and not as Area. Library Expert does not have an option to set this.

So I think there are three ways to go:
- Scripting in Pulsonix: Advantage that you may correct a whole Lib at once, but more complex
- Asking the PCBLibraries Guys to Change the Export Options: they are very kind People but this may be difficult
- writing a program that changes the LibExpert Export file before importing the footprint in Pulsonx: I guess it is the easiest and best Option but needs some Investigation and test

I will try to figure out the 3rd way.

@cioma: Thank you for your file. It is very similar to what we do. We should work on a good way to automate those steps.

If I find out how to manage it I will let you know. If somebody has a good idea please let me know.

Martin

Martin Posted - 24 Jul 2018 : 06:17:24
Thank you for your comments.
I will try to do the Settings in Library Expert. I use the Enterprise Edition and it should work. I will let you know if it works.

Stay tuned...

Martin
jameshead Posted - 22 Jul 2018 : 15:36:04
If you have a technology file with your line styles and text styles in it, all you need to do in PCB Libraries Footprint Expert is to change the settings under "Draft" to be equal, then your generated output from Footprint Expert, when imported into Pulsonix, will use the existing styles in the Pulsonix Technology.

If you have values for line widths and text styles in your Pulsonix technology file that differ from the default values in PCB Libraries then you can alter the Draft settings in PCB Libraries and save them as the default as long as you are using the Enterprise (paid for) version of PCB Libraries. The old "Lite" version, now known as "Professional" allows you to change the Draft settings for a footprint output but not to save them to use again.
cioma Posted - 21 Jul 2018 : 09:23:11
I'm using PCB Library Expert with Pulsonix too and have the same issues. It would be great if you could automate those manual operations.

Please see the attached file for a list of step-by-step operations that I perform in order to cleanup footprints generated by PCB LE. Although it's customized to my workflow perhaps it would be useful for your script too.



Download Attachment: pcble_psx.pdf
56.89 KB