delete every ATTRIBUTE for each one component in library

delete every ATTRIBUTE for each one component in library

cstpierreN65WL
Observer Observer
1,789 Views
9 Replies
Message 1 of 10

delete every ATTRIBUTE for each one component in library

cstpierreN65WL
Observer
Observer

Hi, I want to manage my parts libraries. And one things I want to do is standardized all attributes in it. And I would like to write a SCRIPT or a ULP for automated the job. If open the library and I open one device and I open it's ATTRIBUTES I can del each attribute one by one. So I suppose It's possible to do it in SCRIPT or ULP if the fonction exist in manual way.

I konw the add_attrib_all_devices.ulp But it's doesn't do what I want, I want to delete all ATTRIBUTEs and after thats Add all of ATTRIBUTE that I want.

 

Thank you

0 Likes
1,790 Views
9 Replies
Replies (9)
Message 2 of 10

cstpierreN65WL
Observer
Observer

What I experimented with add_attrib_all_devices.ulp is that I can just add new ATTRIBUTE NAME to de variant of the devices. Is that sound ok?

0 Likes
Message 3 of 10

jorge_garcia
Autodesk
Autodesk
Hi @cstpierreN65WL,

I hope you're doing well. There is a ULP called run-loop-all-devicesets-script.ulp that comes with EAGLE. Basically you can setup a script to delete attributes and then use this ULP to run it on all the devices in your library.

Let me know if there's anything else I can do for you.

Best Regards,


Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes
Message 4 of 10

Kristey
Advocate
Advocate

@jorge_garcia any idea how can we do this?


@jorge_garcia wrote:
you can setup a script to delete attributes



0 Likes
Message 5 of 10

jorge_garcia
Autodesk
Autodesk
Hi Kristey,

I hope you're doing well. See help ATTRIBUTE

ATTRIBUTE part_name attribute_name DELETE

This will only work if the attribute is empty.

Let me know if there's anything else I can do for you.

Best Regards,


Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes
Message 6 of 10

c_nicks
Participant
Participant

These are 2 of the attribute handling ULPs that I use to standardize and handling attributes.

The atribute-library.ulp can delete all of the attributes from an entire library, as well as setup library wide attributes.
The attribute-deviceset.ulp is used to setup deviceset wide attributes. For multiple sets I use scr files an run them from a custom menu.

I've attached a copy of my standard attribute setup script. I have many others which setup additional attributes based on device type. Those would look something like this.

# Sets standard CAPACITOR attributes for current deviceset
# -----------------------------
SCRIPT ATT_SET_STANDARD;

run attribute-deviceset FEAT constant;
run attribute-deviceset RATE constant;
run attribute-deviceset TC constant;
run attribute-deviceset TOL constant;
run attribute-deviceset VALUE constant;

# -----------------------------
Message 7 of 10

Kristey
Advocate
Advocate

@jorge_garcia wrote:
Hi Kristey,

I hope you're doing well. See help ATTRIBUTE

ATTRIBUTE part_name attribute_name DELETE

This will only work if the attribute is empty.

Let me know if there's anything else I can do for you.

Best Regards,

I'm fine, thanks Jorge.

That way it doesn't help much.
Nowadays there are many component repositories, all with different attributes.

I have my own attributes that I want to give to the components.
And I want to delete all the others that are not my attributes and then populate all the devices in a bookstore with my attributes.

At this moment, to "clean" the components, I have to delete them one by one.
Could you find a way to clean it up all at once?


At this point I have to export the libraries to edit the XML.
It is complex and with a high possibility of "error".

0 Likes
Message 8 of 10

Kristey
Advocate
Advocate

Hi @c_nicks  thank you for sharing that information.

I tried use to clear all Attributes on libraries but I don't have success with it.

Can you explain me how I can made it?

 

INFO: 
Fusion 360 - 2.0.9006

0 Likes
Message 9 of 10

c_nicks
Participant
Participant

There will still some manual effort in clearing entire libraries, but the attribute-library.ulp should be able to speed it up.
What I would suggest is to create a list of all of the attributes you'd like to remove from the libraries and build a scr file to run the ulp multiple times to clear them all.
With the list of attributes, build a command list like the following, replacing the *** with the attribute name (uppercase) for each. This should be a text file, that gets renamed with .scr file extension.

Your reply has info for Fusion, which is untested. I do not know of a way to change where Fusion looks for ulp/scr files. They may have to be added to your profile folder or something similar.

 

run attribute-library.ulp **1 delete;

run attribute-library.ulp **2 delete;

0 Likes
Message 10 of 10

Bogdan_UA
Explorer
Explorer

Thank you! Perfect tool!

0 Likes