Automated ilogic drawing template, how to update user parameters to existing drawings?

Automated ilogic drawing template, how to update user parameters to existing drawings?

A.Acheson
Mentor Mentor
843 Views
3 Replies
Message 1 of 4

Automated ilogic drawing template, how to update user parameters to existing drawings?

A.Acheson
Mentor
Mentor

Hi All,

I have created a drawing template that has user parameters in the file to set the sheet size, titleblock, weld symbol information etc all controlled by an iLogic form. The file ends up with approx 10+ multi value parameter. Some of the parameters are updated via excel during the drawing detailing.

 

As the template is still evolving I find that the parameters and there values of existing files are consistently out of date with the templates. 

1. Would the best solution be remove the user parameters and place all the variables in the code as arrays. How would this work in the form? 

2. Could the parameters be updated from the template file via XML import? Would this change the multi value (current value) and potentially change the file without the user knowing. 

I would appreciate any help on this. We are about to release the template  and a small problem is getting bigger the more volume of drawings are created. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
844 Views
3 Replies
Replies (3)
Message 2 of 4

Ralf_Krieg
Advisor
Advisor

Hello

 

It's difficult to say.

If you remove the parameters, you can no longer display them as options in your form. So you lost all of the functions of your form. The alternative is in my opinion a windows.form but then you start coding your functions from scratch. 😖

What about a version tag in your drawing template? The next updated template version holds a property "template version" with value 1. All drawings without this version property are outdated. This is the first step to find if a drawing is created with an old template version and prevent from updating drawings that are already up to date. If version is not current, you can/must "update".To prevent the user modify or delete the version, you can use a hidden propertyset or attributes.

AFAIK, if you set a new value list of a user parameter, and the selected value of the current value list is also in the new list, the selected value will not change. A short test with a manual manipulated XML file allows to edit value lists and retain selected value.

Anyway, you will have to test, test, and ... test.

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 4

A.Acheson
Mentor
Mentor

@Ralf_Krieg  Thank you for your input.

 

The version control check would be a  good way to check and run the update accordingly. 

I have noticed with the xml import method, that the imported parameters take priority and thus the existing drawing values get changed. To counteract that I have thrown together a code to keep parameter("Size").Value static. Perhaps there is a cleaner way to do this for all parameter values. 

A = Parameter.Value("Size")
MessageBox.Show(A, "Before")
iLogicVb.Automation.ParametersXmlLoad(ThisDoc.Document, “C:\Standard-params.xml")
Parameter.Value("Size") = A
MessageBox.Show(A, "After")

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 4 of 4

Ralf_Krieg
Advisor
Advisor

Hello

 

I thought you would export the parameters as XML, edit and re-import. This way, the actual values are included in the XML file and were restored on import. My fault, sorry. Should read more carefully.

The way you do doesn't matter, you always have to read out values before and restore it afterwards while import overwrite existing values. Or you don't import, but read in XML file and edit every parameter. Sounds a bit more difficult to me. Then it would be easier to hard code the new values and skip XML complete.

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes