SimplifiedLogic / creoson

OpenSource Automation using JSON Transactions for PTC's CREO Parametric
http://www.creoson.com
MIT License
81 stars 23 forks source link

parameter : list - assembly treeview #41

Closed dmtr99 closed 4 years ago

dmtr99 commented 4 years ago

Is it possible to retrieve the parameters like stated in an assembly treeview? => list of all the components of an assembly with their parameters Is it also possible to take into account that sometimes the parameters are changed with flexibility.

Use case: in my company we use the parameters to remove components out of bom tables, this would allow me to extract the content of a bom table without opening the part.

I would also like to add a "files" parameter in the [parameter : list] so you can specify from which files you want the parameters. Currenly you have the option to retrieve all the parameters of one file, or to retrieve all the parameters of all files. This could also be used to retrieve the information above, the only problem would be if flexible components where present.

davidhbigelow commented 4 years ago

Is it possible to retrieve the parameters like stated in an assembly treeview?=> list of all the components of an assembly with their parameters

Couple of options (shameless commercial product plug coming at the end of the email) :)

The above should get you every model and all the parameters within each model that is in the Creo Session... then it is just a matter of what do you want to do with the data after...

You can filter the parameter : list request with specific array of parameter "names" you are interested in obtaining - also supports wildcards.

The "flexibility" -- is a bit of a toss up... I have not tested... but if the parameter value is set to a different value -- it should be reported to the current value of the parameter.

I would also like to add a "files" parameter in the [parameter : list] so you can specify from which files you want the parameters. Currenly you have the option to retrieve all the parameters of one file, or to retrieve all the parameters of all files.This could also be used to retrieve the information above, the only problem would be if flexible components where present.

You are right... the file parameter only accepts a single name "plate45.prt" -- or a wildcard "plate*.prt" query. A specific list of files to process would be possible as an array of names (will discuss/consider)... the workaround is to loop through the model names you already know you want to process as an array - passing each modelName into the parameter : list function:

In Nitro-CELL http://www.simplifiedlogic.com/nitro-cell (shameless plug) -- we have a function called "model : REPORT_ITEM_CNT_PARAMS" - which takes an active/named assembly as input and a list of specific parameters you want to extract... then writes the results to a target Excel Worksheet/Cell Address as a BOM table of componentName, Qty, param(s) -- and each row with the related values. Once in excel ... you can then make decisions as to the next operations (e.g. remove models, etc.) More to come on this in the future. [image: 2020-02-08 at 11.05 AM.png]

results in this: [image: 2020-02-08 at 11.04 AM.png]

In Nitro-BOM http://www.simplifiedlogic.com/nitro-bom (another shameless plug) - you can do the same thing - but it has a lot more report formatting options and the ability to exclude walking / reporting of items. It also has some batching capabilities to really keep things tight when working with large assemblies for subtle parameter changes. [image: 2020-02-08 at 11.08 AM.png] [image: 2020-02-08 at 11.10 AM.png]

Hope the above device/examples help.

Dave

On Sat, Feb 8, 2020 at 1:09 AM dmtr99 notifications@github.com wrote:

Is it possible to retrieve the parameters like stated in an assembly treeview? => list of all the components of an assembly with their parameters Is it also possible to take into account that sometimes the parameters are changed with flexibility.

Use case: in my company we use the parameters to remove components out of bom tables, this would allow me to extract the content of a bom table without opening the part.

I would also like to add a "files" parameter in the [parameter : list] so you can specify from which files you want the parameters. Currenly you have the option to retrieve all the parameters of one file, or to retrieve all the parameters of all files. This could also be used to retrieve the information above, the only problem would be if flexible components where present.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/41?email_source=notifications&email_token=AAMSRJOCA64UZLQBDO5YRDDRBZECHA5CNFSM4KRYRXX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IL7CYVQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMSRJPSJGJ3EFE7U5FGV7TRBZECHANCNFSM4KRYRXXQ .

-- David Bigelow, President Simplified Logic, Inc https://www.simplifiedlogic.com | SimilarParts.ai C: 317-431-5454