What's new

Property Data

idslk

Alibre Super User
Only Version update to actual Alibre and AlibreScript version

Regards
Stefan
 

Attachments

  • Write_file_property04_forum.py
    2.4 KB · Views: 17

Cator

Senior Member
Hi Stefan, since I have used your script with pleasure, you would like to update it to Alibre version 23 ... I am not able to understand where the problem is but it does not work

greetings Francesco
Traceback (most recent call last):
File "<string>", line 55, in <module>
EnvironmentError: System.Runtime.InteropServices.COMException (0x80070057): Generata eccezione di tipo 'System.Runtime.InteropServices.COMException'.
in com.alibre.automation.DesignProperties.ExtendedDesignProperty(ADExtendedDesignProperty propertyID, Object propertyValue)
in Microsoft.Scripting.Interpreter.ActionCallInstruction`3.Run(InterpretedFrame frame)
in Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
in Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
in Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
in Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
in Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
in IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
in Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
in AlibreScript.UI.IronTextBoxControl.#P2b(Object #Dp)
>>>
 

idslk

Alibre Super User
Hello Francesco,

i'm glad to hear
I have used your script with pleasure
:)
you would like to update it to Alibre version 23
I'll update it when V23 is officially released. The Beta testing procedure is not convinient enough for me...all the install, deinstall and...
Have you tried the same data file with V22?
Can you post the data file?

Regards
Stefan
 

idslk

Alibre Super User
@Cator , Hello Francesco,

i've updated to V23 official and testet the script.
It works as expected.
Two "failure alerts" that the script was made for a different Alibre and AlibreScript version, but the data file was correctly transmitted to the properties of the cad file. There might be some corrupted or wrong data in your table.
Can you upload your data file? I will check it then.

Regards
Stefan
 

Cator

Senior Member
Hi Stefan, here is the sample document with delay .... while giving me an error message some data (the first five six) are then entered empty data .... thank you for your work
See you soon
FrancescoProperty_Data_File - Excel 22_05_2021 09_03_56.png
unfortunately I cannot insert an Excel sheet here
 

idslk

Alibre Super User
unfortunately I cannot insert an Excel sheet here
Hello Francesco,

"zipping" the file should allow you the upload...

Looking at the picture, i assume that the entries with a calendar datum in them are not matching the datum format which is used in Alibre.
(See HERE)

Regards
Stefan
 

Cator

Senior Member
Hello Stefan,
this is the file.....i have change the data format but i have problem .....
See you soon Francesco
 

Attachments

  • Property_Data_File.zip
    7.8 KB · Views: 7

idslk

Alibre Super User
Hello Francesco,

take a look at cell B16. There should be a date for "AD_MFG_APPROVED_DATE"... you've given a value of "Cator" and this is not what is expected there.
Change it to eg. "2021.05.15" and it will work.
upload_2021-5-22_22-8-40.png
I've addapted the script to V23 (to get rid of the warnings...;)) and corrected the failure at trying to open with no file chosen.

Regards
Stefan
 

Attachments

  • Write_file_property05_forum.py
    2.5 KB · Views: 6

Cator

Senior Member
Hello Stefan,
i have corrected the error and now the script is ok ::):):):):);)
Thanks a lot for your generosity
See you
Francesco
 

Cator

Senior Member
Hello Francesco,

take a look at cell B16. There should be a date for "AD_MFG_APPROVED_DATE"... you've given a value of "Cator" and this is not what is expected there.
Change it to eg. "2021.05.15" and it will work.
View attachment 33589
I've addapted the script to V23 (to get rid of the warnings...;)) and corrected the failure at trying to open with no file chosen.

Regards
Stefan
Stefan, a small clarification .... If I use the script and then modify the material using one Customized by me (Working with wood mainly I have to refer to weights taken directly from the supply) the subsequent data are deleted .... what normal?
 

Cator

Senior Member
So .. 1) I start the Script and select the file I sent you (corrected) 2 I want to change the material I click on Material and set for example Cherry Wood 3)
All data previously set with the script is cleared and only the cherry material remainspioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_32_14.png pioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_31_49.png View attachment 33592 pioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_31_14.pngpioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_32_14.png pioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_31_49.png pioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_31_14.png pioppo3 - Config_1_ - Alibre Design Expert V23 22_05_2021 23_32_24.png
When I click ok to the message of the last screenshot all the other data loaded and saved previously disappears
 

idslk

Alibre Super User
Hello Francesco,

i tried it step by step:

1) Transfered data with the script and looked into file properties:
upload_2021-5-23_0-14-9.png

2) Left the file properties with the "Apply" and then the "OK" button.
upload_2021-5-23_0-16-18.png

3)RMB on Material in the explorer and selected "Select from MaterialLibrary":
upload_2021-5-23_0-18-8.png

4) chosen some wood there:
upload_2021-5-23_0-19-14.png

5) left with "Apply"
6) Got the message:
upload_2021-5-23_0-20-10.png

7) clicked "Ja (OK))

8) Back to file properties:
upload_2021-5-23_0-22-8.png

Material changed from Mogano(from your file) to "Buche"(from the Material Library). It looks for me like what i expected.

Do i miss something or where should be some other entries?

Regards
Stefan

Edit: Due to the new Material System an entry in the standard properties for material canges the main property to custom
The "MaterialLibray" material will not be set:
upload_2021-5-23_0-32-35.png
May some time i will get access to this materials from the data base...
 
Last edited:

idslk

Alibre Super User
May some time i will get access to this materials from the data base...
looks the time has come...;)

Try the 06 Version. If your material from your data file exists in the MaterialLibrary it should be set correctly now. If it isn't in the Lib it will be set as custom.

Regards
Stefan
 

Attachments

  • Write_file_property06_forum.py
    2.8 KB · Views: 27

Cator

Senior Member
Thanks Stefan,
you managed to understand me even if I expressed myself in a non-linear way !!;);)
Thus the "creature" grows and is really very useful in everyday use! I wonder if one day it will be possible to automate even the information at the bottom of the manufacturing drawings .... dream but in the meantime
Thanks
Francesco
 

Cator

Senior Member
Hi Stefan,
I keep using your script all the time and I'm trying to build a worksheet with customer database sheets, materials and so on ... would you help me understand how I can update the script so that the error message for the current version of Alibre? I don't want to bother you all the time with every new release!
Thanks Francesco.
 

idslk

Alibre Super User
Hello Francesco,

The "warnings" are there to remind you that the script might run not as intended due to unknown changes from Alibre API/Script side. They do not stop the script from running.
I'm not sure how you will judge by yourself if the script is running ok on a new version as it seems you haven't found this information by yourself, but anyway as you are using the script on your own risk :
Code:
made_with = 343305
made_with_Alibreversion = 'PRODUCTVERSION 23,0,0,23050'

made_with stands for the alibre script version, made_with_Alibreversion stands for ... ;)
Learning by doing...:)

Regards
Stefan
 

Cator

Senior Member
Stefan,
since the last update of the V25 version I noticed that your script fills the information property correctly.
However, when I open a new document this information remains as a preset and I do not find the table empty. How can I get around this behavior?
I have tried to "empty" the excel table to have a "virgin" table this way but unfortunately with little success.....
Do you recommend something or do I have to fill it manually?
Does it also do the same behavior to you?
Thanks @idslk
Francesco
 
Last edited:
Top