Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Delete all technologies / attribute sets

bast2R8CK
Participant

Delete all technologies / attribute sets

bast2R8CK
Participant
Participant

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
Reply
Accepted solutions (1)
325 Views
2 Replies
Replies (2)

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.
0 Likes

bast2R8CK
Participant
Participant
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().

1 Like