Delete all technologies / attribute sets

Delete all technologies / attribute sets

bast2R8CK
Contributor Contributor
876 Views
3 Replies
Message 1 of 4

Delete all technologies / attribute sets

bast2R8CK
Contributor
Contributor

Please forgive if I mix up some of the names here, they are so confusing to me. But please do correct me.

 

I want to delete all technologies / attribute sets of all devices/components in a library using an ulp or scr script.

I know I can achieve this for a selected device/variant/package (?) by the following scr commands:

package variant_name
technology -*

But for that to work on all devices/variants/packages, I'd have to know all the variant names.

I know how to get them using an ulp script:

string Version = "0.0.0";

string fname;
fname = argv[0];
fname = filesetext(fname, ".scr"); 

output(fname, "wtD") {
    library(L) {
        L.devicesets(S) {
            S.devices(D) {
                string technologies[];
                int n = strsplit(technologies, D.technologies, ' ');
                for (int i = 0; i < n; i++) {
                    printf("device %s technology %s\n", D.name, technologies[i]);
                }
            }
        }
    }
}

However, I don't know how to then delete the technologies inside the ulp script.

 

Is there a way to achieve both (find out device/variant/package names and delete the technologies) using only one script?

0 Likes
Accepted solutions (1)
877 Views
3 Replies
Replies (3)
Message 2 of 4

jorge_garcia
Autodesk
Autodesk

Hi @bast2R8CK ,

 

I hope you're doing well. See the attached image

jorgegarcia_0-1700694615246.png


You can use the run-loop ulps to take your simple script and have it run through all the components in a library and then all of the libraries.

 

Let me know if this helps.

 

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.
Message 3 of 4

bast2R8CK
Contributor
Contributor
Accepted solution

OK, so I guess, it is not possible to achieve the task using only a single script.

I solved my problem using both, ULP and SCR: ULP to find out all the technologies and outputting the necessary SCR commands either to a file that is afterwards executed, or executing SCR commands when finishing the ULP script using the commands as argument for exit().

Message 4 of 4

fisherket812
Explorer
Explorer

@bast2R8CK wrote:

Please forgive if I mix up some of the names here, they are so confusing to me. But please do correct me.

 

I want to delete all technologies / attribute sets of all devices/components in a library using an ulp or scr script.

I know I can achieve this for a selected device/variant/package (?) by the following scr commands:

package variant_name
technology -*

But for that to work on all devices/variants/packages, I'd have to know all the variant names.

I know how to get them using an ulp script:

string Version = "0.0.0";

string fname;
fname = argv[0];
fname = filesetext(fname, ".scr"); 

output(fname, "wtD") {
    library(L) {
        L.devicesets(S) {
            S.devices(D) {
                string technologies[];
                int n = strsplit(technologies, D.technologies, ' ');
                for (int i = 0; i < n; i++) {
                    printf("device %s technology %s\n", D.name, technologies[i]);
                }
            }
        }
    }
}

However, I don't know how to then delete the technologies inside the ulp script.

 

Is there a way to achieve both (find out device/variant/package names and delete the technologies) using only one script?

I genuinely wanted to share this because it really helped me streamline my workflow. Sometimes, these little tricks with scripts can save you so much time and effort, and I hope it might be useful for someone else too. Just like how wearable technology is transforming the sports world, combining these tools in unexpected ways can make a big difference in other industries as well. Again, here the article on wearable tech in sports, which I found really insightful


Using ULP to gather the necessary information and then passing it to an SCR script for deletion worked like a charm. It saved me so much time! I just wanted to thank you for sharing the solution, it really helped me understand how to approach the problem better. If anyone else is facing a similar issue, this method is definitely a great way to go about it!