| |
| Gut zu wissen: Hilfreiche Tipps und Tricks aus der Praxis prägnant, und auf den Punkt gebracht für EPLAN |
Autor
|
Thema: Error when using XEsSetProjectPropertyAction in Script (1217 mal gelesen)
|
blitzkreig Mitglied Engineer
Beiträge: 20 Registriert: 03.09.2018
|
erstellt am: 16. Jan. 2019 06:53 <-- editieren / zitieren --> Unities abgeben:
Hi, I'm trying to set certain project properties via script file. Some properties have PropertyIdentName like "EPLAN.Project.UserSupplementaryField8", but some other, I found the propertyIndex from the Eplan help file. But when I try to change a property using propertyIndex, it is giving me this error: The '[10011]' property cannot be set. My code: Code: CommandLineInterpreter oCLI5 = new CommandLineInterpreter(); ActionCallingContext acc5 = new ActionCallingContext(); acc5.AddParameter("PropertyIndex", "10011"); acc5.AddParameter("PropertyValue", "testvalue"); oCLI5.Execute("XEsSetProjectPropertyAction", acc5);
Can someone help me fix this issue? Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
pxecad Mitglied
Beiträge: 229 Registriert: 13.02.2015 - - - - - - - - - - - - - - - - - - - - - Electric P8 2.9.4 SP1 Update14 Electric P8 2023 Electric P8 2024 EEC Professional 2023 (Web EEC) - - - - - - - - - - - - - - - - - - - -
|
erstellt am: 16. Jan. 2019 07:50 <-- editieren / zitieren --> Unities abgeben: Nur für blitzkreig
|
blitzkreig Mitglied Engineer
Beiträge: 20 Registriert: 03.09.2018
|
erstellt am: 17. Jan. 2019 04:35 <-- editieren / zitieren --> Unities abgeben:
Zitat: Original erstellt von pxecad: Hello,i think you can find the answer here: https://suplanus.de/xessetprojectpropertyaction-propertyidentname/ Since EPLAN 2.4 --> XEsSetProjectPropertyAction /PropertyIdentName:"EPLAN.Project.UserSupplementaryField1" /PropertyIndex:0 /PropertyValue:"My project property"
Hi, "Project description" field is not a user supplementary field which is why I used the propertyIndex to change it's value. Your solution is for changing property value using IdentName which does not work in this case if I read correctly.
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
F.S. Moderator
Beiträge: 1815 Registriert: 23.04.2003 EPLAN Electric P8 2023 Prof.
|
erstellt am: 17. Jan. 2019 07:06 <-- editieren / zitieren --> Unities abgeben: Nur für blitzkreig
Hello, you must use the "PropertyId" Parameter. Example:
Code:
CommandLineInterpreter oCLI5 = new CommandLineInterpreter(); ActionCallingContext acc5 = new ActionCallingContext(); acc5.AddParameter("PropertyId", "10011"); acc5.AddParameter("PropertyIndex", "0"); acc5.AddParameter("PropertyValue", "testvalue"); oCLI5.Execute("XEsSetProjectPropertyAction", acc5);
------------------ grüße FrankS Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
blitzkreig Mitglied Engineer
Beiträge: 20 Registriert: 03.09.2018
|
erstellt am: 17. Jan. 2019 10:04 <-- editieren / zitieren --> Unities abgeben:
Zitat: Original erstellt von F.S.: Hello,you must use the "PropertyId" Parameter. Example:
Code:
CommandLineInterpreter oCLI5 = new CommandLineInterpreter(); ActionCallingContext acc5 = new ActionCallingContext(); acc5.AddParameter("PropertyId", "10011"); acc5.AddParameter("PropertyIndex", "0"); acc5.AddParameter("PropertyValue", "testvalue"); oCLI5.Execute("XEsSetProjectPropertyAction", acc5);
Oh my god that's just so stupid of me. Such a simple fix! Thanks a lot for helping Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |