Drawings - Custom Properties from Text File?

m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Drawings - Custom Properties from Text File?

Unread post by m2shell »

For a given job, I usually break up my drawing sheets into separate files. This is mostly to keep drawing file size to a minimum, and thus drawing responsiveness, but that's besides the point.

I generally have my Title Block populated with text from Custom Properties which are integrated into the drawing template - Items like "Architect, Contractor, PDF Filename, Sheet Title, etc.

This method is Certainly cool when I have multi-sheets on one file, but when I have several drawings that need to be populated with the same info, it can be a little tedious.

I know I can make a custom template for each job, but most are not large enough to justify making new Templates for each job. (Or at least in my head that seems like a lot of work - but maybe it isn't! )

Anyway, my question is, can I simply have an external text file (similar to Equations.txt) that multiple drawings can reference for Custom Property info?

Thanks!
User avatar
DanPihlaja
Posts: 842
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 805
x 978

Re: Drawings - Custom Properties from Text File?

Unread post by DanPihlaja »

m2shell wrote: Tue Feb 15, 2022 1:48 pm For a given job, I usually break up my drawing sheets into separate files. This is mostly to keep drawing file size to a minimum, and thus drawing responsiveness, but that's besides the point.

I generally have my Title Block populated with text from Custom Properties which are integrated into the drawing template - Items like "Architect, Contractor, PDF Filename, Sheet Title, etc.

This method is Certainly cool when I have multi-sheets on one file, but when I have several drawings that need to be populated with the same info, it can be a little tedious.

I know I can make a custom template for each job, but most are not large enough to justify making new Templates for each job. (Or at least in my head that seems like a lot of work - but maybe it isn't! )

Anyway, my question is, can I simply have an external text file (similar to Equations.txt) that multiple drawings can reference for Custom Property info?

Thanks!

I could be wrong......but I don't think so.

There is a text file that drives the properties that show up in the drop down menu for the "Property Name" area.

However, have you looked into the Property Tab builder?

Basically, it is an area that you can use to populate custom properties of any file using drop down menus and whatnot. See below. That last picture is an example of what we use here. (I wish that there was more intelligence in it, but there isn't)
image.png
image.png
image.png
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

DanPihlaja wrote: Tue Feb 15, 2022 2:46 pm
However, have you looked into the Property Tab builder?
Love the Property Tab Builder. I use the property tab area to populate my title block(s), and it is a great help. I was just wondering if there was any way to make my process even more awesome.

Thanks!
Screenshot_4.png
User avatar
DanPihlaja
Posts: 842
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 805
x 978

Re: Drawings - Custom Properties from Text File?

Unread post by DanPihlaja »

m2shell wrote: Tue Feb 15, 2022 3:08 pm Love the Property Tab Builder. I use the property tab area to populate my title block(s), and it is a great help. I was just wondering if there was any way to make my process even more awesome.

Thanks!
Screenshot_4.png
It is interesting that your company name is SMI (Stainless Metals, Inc). Our company name is also SMI (Skilled Manufacturing, Inc)
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

DanPihlaja wrote: Tue Feb 15, 2022 3:42 pm It is interesting that your company name is SMI (Stainless Metals, Inc). Our company name is also SMI (Skilled Manufacturing, Inc)
WOW. That's very funny. SMI, my main client, is a small company here in NYC with extremely talented fabricators. Been working with them for years.
User avatar
zwei
Posts: 701
Joined: Mon Mar 15, 2021 9:17 pm
Answers: 18
Location: Malaysia
x 185
x 600

Re: Drawings - Custom Properties from Text File?

Unread post by zwei »

Beside the custom property template, you may also want to look at using macro to populate some of the "fixed" properties

For eg: I have a macro which is used to populate some of the properties that has the same value (eg: customer name or project no) for a project. The remaining "flexible" properties (eg: default tolerance, pn) is then changed using the custom property template
You could even adjust the macro so that it can read from txt file which user can change more easily
Far too many items in the world are designed, constructed and foisted upon us with no understanding-or even care-for how we will use them.
User avatar
CarrieIves
Posts: 163
Joined: Fri Mar 19, 2021 11:19 am
Answers: 2
Location: Richardson, TX
x 376
x 136

Re: Drawings - Custom Properties from Text File?

Unread post by CarrieIves »

I'll second @Zhen-Wei Tee 's idea of using a macro. We have separate properties in our drawings and our parts. we often copy the description and have a macro to do that. I started with a macro from @gupta9665 and modified it to match our property names. I've attached what I think is the unmodified one I started from.
Attachments
Copy Model Description Custom Property to Drawing-DG.swp
(49 KiB) Downloaded 93 times
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

CarrieIves wrote: Tue Feb 15, 2022 6:56 pm I'll second @Zhen-Wei Tee 's idea of using a macro. We have separate properties in our drawings and our parts. we often copy the description and have a macro to do that. I started with a macro from @gupta9665 and modified it to match our property names. I've attached what I think is the unmodified one I started from.
Thanks to @CarrieIves & @Zhen-Wei Tee ! I'll check out your attached macro. Appreciate the input!

-M
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: Drawings - Custom Properties from Text File?

Unread post by mattpeneguy »

I was thinking macro, too. But I was hoping someone had better options.
Something to consider, if this is setup as a template, is that you could use a Macro Feature and add it to your Feature Tree in your parts, asm, and drawing templates. You could link the Macro Feature to a network "custom properties.txt" file. You update the text file and any time you open a file it could read in the properties.
Now before you go off and set something like this up, IT COULD BE VERY DANGEROUS. Before rolling it out, definitely extensively test it. And when you think it works, TEST IT BEFORE UPGRADING SW. This is the type of thing that can really burn you if SW updates and it messes this type of workflow up.
Also, before rolling this out, I'd like to hear from someone like @artem or @josh because this may be a terrible idea for some reason I'm not considering.
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

mattpeneguy wrote: Wed Feb 16, 2022 8:26 am I was thinking macro, too. But I was hoping someone had better options.
Something to consider, if this is setup as a template, is that you could use a Macro Feature and add it to your Feature Tree in your parts, asm, and drawing templates. You could link the Macro Feature to a network "custom properties.txt" file. You update the text file and any time you open a file it could read in the properties.
Now before you go off and set something like this up, IT COULD BE VERY DANGEROUS. Before rolling it out, definitely extensively test it. And when you think it works, TEST IT BEFORE UPGRADING SW. This is the type of thing that can really burn you if SW updates and it messes this type of workflow up.
Also, before rolling this out, I'd like to hear from someone like @artem or @josh because this may be a terrible idea for some reason I'm not considering.
Holy Moly. I hadn't even heard of the Macro Feature before! I guess I missed the rollout. That is a cool concept. And your warnings, @mattpeneguy, are definitely noted.

That said, I do think that the macro option is the best bet here. I played a bit with the macro @CarrieIves posted, and it definitely contains the seeds of a good direction for what I want. Not having actually done the coding, I can imagine being able to do exactly what i want - create a text file for each job, place it in my file structure, and, while creating the drawing, run a Macro that will do all the needed text population for me. Integrating it into a Macro Feature would probably be several steps down the road, but I really like the concept.
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: Drawings - Custom Properties from Text File?

Unread post by mattpeneguy »

m2shell wrote: Wed Feb 16, 2022 10:08 am Holy Moly. I hadn't even heard of the Macro Feature before! I guess I missed the rollout. That is a cool concept. And your warnings, @mattpeneguy, are definitely noted.

That said, I do think that the macro option is the best bet here. I played a bit with the macro @CarrieIves posted, and it definitely contains the seeds of a good direction for what I want. Not having actually done the coding, I can imagine being able to do exactly what i want - create a text file for each job, place it in my file structure, and, while creating the drawing, run a Macro that will do all the needed text population for me. Integrating it into a Macro Feature would probably be several steps down the road, but I really like the concept.
Take a look at @artem's macros. There's one that runs when the file is loaded about halfway down the page that may be useful for what you are doing:
https://www.codestack.net/solidworks-tools/

Bookmark that site. There's a lot of good examples.
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

mattpeneguy wrote: Wed Feb 16, 2022 10:32 am Take a look at @artem's macros. There's one that runs when the file is loaded about halfway down the page that may be useful for what you are doing:
https://www.codestack.net/solidworks-tools/

Bookmark that site. There's a lot of good examples.
Wonderful site! Thanks very much for the link.
User avatar
Conklin
Posts: 50
Joined: Fri Mar 26, 2021 3:34 pm
Answers: 0
x 10
x 21

Re: Drawings - Custom Properties from Text File?

Unread post by Conklin »

To update the custom properties for a set of drawings or models or assemblies
I use a very handy "Batch Custom Properties" utility by Fifi Riri
a screen shot of part of the help file:
Batch Custom Properties - Help.jpg
I can post a link to get it if anyone desires to try it.
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: Drawings - Custom Properties from Text File?

Unread post by mattpeneguy »

Conklin wrote: Wed Feb 16, 2022 4:59 pm To update the custom properties for a set of drawings or models or assemblies
I use a very handy "Batch Custom Properties" utility by Fifi Riri
a screen shot of part of the help file:
Batch Custom Properties - Help.jpg
I can post a link to get it if anyone desires to try it.
Now that's just cheating!

Come to think of it, I think @artem has a tool that will do something similar. And, #task I believe can do it to. Artem's tool (basic version) is free (doesn't include the Properties in the free version, though). #task is no longer free.
But, if you are using this for production work, and it appears you are, then these tools can quickly pay for themselves in time saved.

Here's a link to #task: https://centralinnovation.com/solidwork ... ns/task-v2
Here's a link to Artem's tool, CAD+: https://cadplus.xarial.com/
artem
Posts: 26
Joined: Thu Mar 18, 2021 1:31 pm
Answers: 3
x 9
x 74

Re: Drawings - Custom Properties from Text File?

Unread post by artem »

Thank you for the mention, @mattpeneguy. I like your idea with a macro feature linked to the external file which will always update the properties (this is a great fit for the macro features). I will add this to CodeStack next week (I am publishing weekly short videos of Macro Of The Week - so this is a good candidate for the next week).

Both Properties+ and 'Batch Custom Properties' macro are based on the Document Manager library, so if you want to update properties for hundreds of files this will be x100 times faster than running a macro for each file via #TASK, Batch+, or Task Scheduler (with most of the time spent on opening, saving, closing etc.). I did benchmark testing for CAD+/Properties+ for 25K files (video + 30K configurations + 20K cut-lists items and updated custom properties in each of those items (e.g. 75K in total) and it took just over an hour. So if we assume it takes about 5 seconds on average to open each file in SOLIDWORKS - just opening those will take over 30 hours + setting properties, saving, finding cut-lists.
Thanks,
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

mattpeneguy wrote: Wed Feb 16, 2022 6:15 pm Now that's just cheating!

Come to think of it, I think @artem has a tool that will do something similar. And, #task I believe can do it to. Artem's tool (basic version) is free (doesn't include the Properties in the free version, though). #task is no longer free.
But, if you are using this for production work, and it appears you are, then these tools can quickly pay for themselves in time saved.

Here's a link to #task: https://centralinnovation.com/solidwork ... ns/task-v2
Here's a link to Artem's tool, CAD+: https://cadplus.xarial.com/
Thanks @mattpeneguy and @Conklin . Have to admit I had no idea how useful this post was going to turn out. I have never looked closely at professional-grade Macro toolsets, and frankly, mind-is-blown :D :shock: :D ; I am seeing some automation that I had not even considered utilizing...
Of course any $ I can spend to make things faster and/or easier is a huge win for my and my clients' productivity. For the moment I will start with one of @artem's products... can't wait.
User avatar
DanPihlaja
Posts: 842
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 805
x 978

Re: Drawings - Custom Properties from Text File?

Unread post by DanPihlaja »

Conklin wrote: Wed Feb 16, 2022 4:59 pm ...
I can post a link to get it if anyone desires to try it.
yes please
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

Conklin wrote: Wed Feb 16, 2022 4:59 pm To update the custom properties for a set of drawings or models or assemblies
I use a very handy "Batch Custom Properties" utility by Fifi Riri
a screen shot of part of the help file:
Batch Custom Properties - Help.jpg
I can post a link to get it if anyone desires to try it.
Looks really interesting.
I found a posting about this on the SW Forums, but can't find an obvious link to the code:
https://forum.solidworks.com/thread/229516
User avatar
DanPihlaja
Posts: 842
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 805
x 978

Re: Drawings - Custom Properties from Text File?

Unread post by DanPihlaja »

m2shell wrote: Thu Feb 17, 2022 12:33 pm Looks really interesting.
I found a posting about this on the SW Forums, but can't find an obvious link to the code:
https://forum.solidworks.com/thread/229516
I don't think that it is code specifically. The document manager is a stand alone application that you download from Solidworks. The link that you specified is just a way to get a free license key for it.

https://www.codestack.net/solidworks-do ... nager-api/
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

DanPihlaja wrote: Thu Feb 17, 2022 3:59 pm I don't think that it is code specifically. The document manager is a stand alone application that you download from Solidworks. The link that you specified is just a way to get a free license key for it.

https://www.codestack.net/solidworks-do ... nager-api/
I thought the Document Manager link was to get a token so a user' can use the Document Manager API. I think the app is 3rd party - "Fifi".

I did actually find a ZIP for "BatchCustomProp.exe" in the comments to the Solidworks Forum posting. Am i allowed to post the ZIP file?

Screenshot_1.png
User avatar
Conklin
Posts: 50
Joined: Fri Mar 26, 2021 3:34 pm
Answers: 0
x 10
x 21

Re: Drawings - Custom Properties from Text File?

Unread post by Conklin »

One should take a look at what Fifi Riri has done with his

"Batch Custom Properties Program"


He has done a wonderful job!!

Once you request your SwDocManager license key (it's free from SW)

It can modify, add, change, delete, single or bulk custom properties and more...

It can do this on parts, drawings or assemblies.

And you can even filter the items you wish to alter.

all this with out even opening SW (useing the "Fast Mode")

In "Slow Mode" it opens the items in SW and preforms the tasks desired.

It is a Great tool!!!

see attachments:
BatchCustomProp033.zip
(79.16 KiB) Downloaded 117 times
The help file:
Batch Custom Properties Program V033\Batch Custom Properties - Help.pdf
Batch Custom Properties - Help.pdf
(267.48 KiB) Downloaded 160 times
m2shell
Posts: 134
Joined: Mon Jun 28, 2021 2:07 pm
Answers: 0
Location: Brooklyn NY
x 121
x 56

Re: Drawings - Custom Properties from Text File?

Unread post by m2shell »

Conklin wrote: Thu Feb 17, 2022 7:33 pm One should take a look at what Fifi Riri has done with his

"Batch Custom Properties Program"


He has done a wonderful job!!
Thanks very much @Conklin !
User avatar
DanPihlaja
Posts: 842
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 805
x 978

Re: Drawings - Custom Properties from Text File?

Unread post by DanPihlaja »

m2shell wrote: Thu Feb 17, 2022 5:03 pm I thought the Document Manager link was to get a token so a user' can use the Document Manager API. I think the app is 3rd party - "Fifi".

I did actually find a ZIP for "BatchCustomProp.exe" in the comments to the Solidworks Forum posting. Am i allowed to post the ZIP file?


Screenshot_1.png
I am probably wrong. I thought it was a stand alone application. My bad.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
Post Reply