What's new

Property Data

idslk

Alibre Super User
Update see: Post#41

Hello colleagues,

here is a short demo of what i've been waiting for...
With 2019 SP2 it works...
Here is a little quick and dirty script to read a *.xlsx file and write the data into your actual session property datas...
The *.xlsx file has to have one sheet with the following structure:

upload_2019-12-4_21-50-55.png

ofcourse the data from B2 to B25 should hold your informations ;-)

You don' have to fill all 24 cells, you can leave blanks...
You have to have the string "Propertydatafile" in B1 it's a quick check for the "right" file...

You can try this at home on your own risc:D As ever: for first tests don't use important files of your business!
Open alibre freshly, create a new simple file(part) and than try the script...

upload_2019-12-4_22-4-12.png
You will be promted to choose the data file
upload_2019-12-4_22-1-28.png
a file requester will appear...
upload_2019-12-4_22-7-51.png
and than it's quickly done...
upload_2019-12-4_22-2-36.png

Regards
Stefan

PS.: it would be nice to get some feedback from you...maybe the script will get some nicer look and a little bit more comfort...
 

Attachments

  • Write_file_property01.py
    2.2 KB · Views: 35
Last edited:

albie0803

Alibre Super User
Would this info get saved to vault or does vault values replace/over-ride them?

Maybe I should try it tomorrow at work? :rolleyes:
 
Hi Stefan -- Whereas I admit to hating the File Properties->Generasl->General listing of values your "offering" (hopefully) provides a way for users to "customize" things better. I am attaching the (xlsx) spreadsheet I have created in this attempt. I get error messages and failure when I attampt to use it, so "more instructions" are probably needed (at least by me). -- Lew
 

Attachments

  • VR7-M00170.zip
    8 KB · Views: 11

idslk

Alibre Super User
Hello Lew,
i've opened your file...
I get error messages and failure when I attampt to use it,
The *.xlsx file has to have one sheet with the following structure:
You have to have the string "Propertydatafile" in B1 it's a quick check for the "right" file...
You have changed the structure...
Maybe i will add some "comfort" functions later, but for now the structure of th range A1:B25 should stay.
The other areas of the sheet can be used for additional informations. More sheets are not tested -> see under "comfort"...
And if you like the word or not, B1 should not have any other content than "Propertydatafile" - which means: no spaces no capital no... only "Propertydatafile".

Regards
Stefan
 
Last edited:

idslk

Alibre Super User
Would this info get saved to vault or does vault values replace/over-ride them?

Maybe I should try it tomorrow at work? :rolleyes:

Sorry, i do not have the vault installed so i haven't tested it. As the values are put into the standard place they will be saved with the part and this should behave the same as you write the values by had into the properties. So if values in this place are normally transfered to the vault, they should behave the same with the script...
Trying this at work? Hm? Not the best idea i think. Maybe after some testing this will be ok...but not yet...

Regards
Stefan
 
i've opened your file...
You have changed the structure...
Maybe i will add some "comfort" functions later, but for now the structure of th range A1:B25 should stay.
The other areas of the sheet can be used for additional informations. More sheets are not tested -> see under "comfort"...
And if you like the word or not, B1 should not have any other content than "Propertydatafile" - which means: no spaces no capital no... only "Propertydatafile".
Hi Stefan -- I had assumed that "Property Data File" would be an "equivalent" as many of the groups I do work for are somewhat "anal retentive" on such subjects. Similarly I have been creating "multisheet spreadsheets" since 1983 and is something I do without thought. The Revision Offset value increments the "Revision ID" through the (American) identifiers for chaned "Levels of Revisaion" (through change level "EZ"). Here is an update that I do hope fixes things... -- Lew
 

Attachments

  • VR7-M00170 20191205B.zip
    7 KB · Views: 11
Hello Lew,
Hi Stefan -- I suspect that the *.xlsx file is required to have a name such as "Propertydatafile." My thought is that it should be "named" the same as the Part or Assembly file to be used to "update" things as changes are made. The attached ZIP file shows some of the work (partial -- by no means complete) I am working towards a "Project File Spreadsheet" system. Eventually I would have a "File Properties-> General->General" spreadsheet for each component within a Project. ??? -- Lew
 

idslk

Alibre Super User
Hi Lew,
please change the cells with red text:
upload_2019-12-5_23-45-57.png
The datum cells have to have the date format your system is using eg. 2019.04.12 including the seperator points! (in the screenshot they are german...)
All value cells should have the cell format "Text (@)" (for B1:B25)
In coloumn C:C i've filled in the names used in the property editor only for guidance...

This is the result after running the script using your "changed" data file:
upload_2019-12-5_23-47-24.png

If i get more comments for the community, i'll thing about the comfort functions...such as supporting multiple sheets identified with the project as the sheetname and so on and on...

Regards
Stefan
 
Hi Stefan -- Ah, I am starting to see. 50+ years of performing work for various agencies of the US government has left me "dating" things as YYYYMMDD. [I often add an A,B,C,D... to the end of the YYYYMMDD value so as I know which one came when during the day.] What mind??? -- Lew
 

TimoCAD

Senior Member
Hi Stefan, what about concatenating Properties for the FileName before saving? :) Maybe a little "AlibreDesign-EDM-Software" like "Solid works-Explorer" is born that way... ;)
 
Hi Stefan -- Attaced is a "lessons learned" document I created shortly after Andy added "spreadsheet access" to the (then) WizoScript. I am not all that great of a "coder" and write up "lessons learned" documents to keep such things at my fingertips.
 

Attachments

  • Accessing Spreadsheet Data using WizoScript -- Rev A.pdf
    116.4 KB · Views: 16

idslk

Alibre Super User
Hello Lew,

looks like the first step to success ;-) and as you've written AlibreScript "uses" (/can use) openpyxl.
There is an extended description under openpyxl ...
If you want to control the data area using a sheetname it will be simply possible, the way using a cell was only a simple check and reminder for the user to take the right file...
You want to see something added?

Regards
Stefan
 

idslk

Alibre Super User
Hello Timo,
concatenating Properties for the FileName
the thought behind the little script was to take a spreadsheet and fill in the known values for the property fields and save them for reuse in the same project.
So if i create a new part or assembly i call only the script an data such as "created by", "creating application" or "recieved from" will be populated very quick.
The data itself is copied into the properties and so will be saved with your part/assembly...
So you will have only one "project specific"-xlsx-file for the intended use. It is possible to blow the script up with little things...let's have a look and as i wrote
PS.: it would be nice to get some feedback from you...maybe the script will get some nicer look and a little bit more comfort...
;)
Regards
Stefan
 
Hi Stefan -- Whereas I have been "coding" since the days of "binary assembler code" I am not that good a "coder." [I reached the "almost good" class in the mid-1970's with FORTH.] Having worked with people usch as Arne Henden and Dennis Ritche, I know what "good coding" looks and works like and know that such terms do not apply to me. However, I am decently good at assembling systems and documenting them. Attached is an old (2016) document on Part Data I "suggested." -- Lew
 

Attachments

  • File Properies-General-Part Data Comments 20160707A.pdf
    102.2 KB · Views: 19
  • GMD Part Data Redesign 20160613A.pdf
    100 KB · Views: 18

Mika

Senior Member
I tried this also and it works, but it ends writing the data to those dates. I tried quite a many different options, text format, date format, different YYYMMDD, DDMMYY...nothing works. (And also it seems to be that scripts cannot be used in sheet metal??)
 

Attachments

  • Flat Bar 50x5 - Aluminum.zip
    9.6 KB · Views: 12

idslk

Alibre Super User
Hello Mika,
nothing works
The datum cells have to have the date format your system is using eg. 2019.04.12 including the seperator points! (in the screenshot they are german...)
All value cells should have the cell format "Text (@)" (for B1:B25)
In coloumn C:C i've filled in the names used in the property editor only for guidance...
...
(And also it seems to be that scripts cannot be used in sheet metal??)
Not directly, it's a little bit more work...

Regards
Stefan
 

Mika

Senior Member
The datum cells have to have the date format your system is using eg. 2019.04.12 including the seperator points! (in the screenshot they are german…)

That means it need to be date format and YYY.DD.MM.?? I cannot find that kinda option in any German location options in Excel. Which country have that YYY.DD.MM. like date format?
 
Which country have that YYY.DD.MM. like date format?
Mika -- The US Department of Defense started using the "YYYYMMDD" format (on certain Projects) in the 1960's as it makes a really simply "searchable" datapoint. I began using it in 1969. I am unaware of being an "official format" on any national level. -- Lew
 
Top