RootParameterSet not working - CATIA API
| Uživatel | Příspěvek | 
                      Nirantar Vidyarthee ![]() ![]() Poslat zprávu | Profil  | 
                         
                        Datum:
                        5.5. 2023
                         | Zobrazeno:  
                        1599x Konfigurace CATIA: V5 Text dotazu:  | 
                           
                           Ing Jan Cinert ![]() Poslat zprávu | Profil  | 
                            [#7139]
                             | Publikováno: 
                            05.05. 2023 - 13:09 Hi,
 I did a quick test and it seems this is normally working. Have a look at the attached image with a small example. The script always returns what is expected. A tip for you. Try to use object Document.Product.ReferenceProduct.. instead of Document.Product, maybe it helps....  | 
                           
                           Nirantar Vidyarthee ![]() ![]() Poslat zprávu | Profil  | 
                            [#7140]
                             | Publikováno: 
                            05.05. 2023 - 15:12 Appreciate your prompt response.
 I am trying to access the parameters of the Top ProductDocument. I was expecting that the default parameters like 'Part Number' could be accessed through RootParameterSet which I now understand was wrong. When I added a user parameter to the top assembly, then count showed 1. Since I am accessing Top Assembly Document, there is no need to use ReferenceProduct property. Also, it now seems that the RootParameterSet can contain only User Defined parameter. (DirectParameters property). So, I am just wondering what additional parameters can AllParameters collection contain.  | 
                           
                           Ing Jan Cinert ![]() Poslat zprávu | Profil  | 
                            [#7141]
                             | Publikováno: 
                            10.05. 2023 - 18:42 The RootParameterSet represents the "container" where users parameters are strored (and also located in tree).
 PartNumber (and Description, Revision etc) are properties of a Product object (but also can be accesed like parameters), and the last group of parameters is UserRefProperties. The best approach how to access the specific parameter is via Item method. I am not 100% sure at the moment but I think that the collection Part / Product.Parameters contains all in Part / Product existing parameters. Only when you want to list parameters of specific set you can play with ParametersSet. There is also a method Sublist which returns nested (or maybe better said added) user parameters e.g. in a Sketch etc.  | 
Uživatel nepřihlášen
Pro zobrazení obsahu stránky / provedení akce (vytvoření nového téma, napsání odpovědi do diskuse apod.) musíte být přihlášeni.












