Drawings - Custom Properties from Text File?
Drawings - Custom Properties from Text File?
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 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!
- DanPihlaja
- Posts: 842
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 807
- x 978
Re: Drawings - Custom Properties from Text File?
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)
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
Re: Drawings - Custom Properties from Text File?
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!
- DanPihlaja
- Posts: 842
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 807
- x 978
Re: Drawings - Custom Properties from Text File?
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
Solidworks 2022 SP4
2 Corinthians 13:14
Re: Drawings - Custom Properties from Text File?
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.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)
Re: Drawings - Custom Properties from Text File?
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
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.
- CarrieIves
- Posts: 163
- Joined: Fri Mar 19, 2021 11:19 am
- Location: Richardson, TX
- x 376
- x 136
Re: Drawings - Custom Properties from Text File?
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 96 times
Re: Drawings - Custom Properties from Text File?
Thanks to @CarrieIves & @Zhen-Wei Tee ! I'll check out your attached macro. Appreciate the input!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.
-M
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: Drawings - Custom Properties from Text File?
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.
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.
Re: Drawings - Custom Properties from Text File?
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.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.
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.
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: Drawings - Custom Properties from Text File?
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: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.
https://www.codestack.net/solidworks-tools/
Bookmark that site. There's a lot of good examples.
Re: Drawings - Custom Properties from Text File?
Wonderful site! Thanks very much for the link.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.
Re: Drawings - Custom Properties from Text File?
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: I can post a link to get it if anyone desires to try it.
I use a very handy "Batch Custom Properties" utility by Fifi Riri
a screen shot of part of the help file: I can post a link to get it if anyone desires to try it.
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: Drawings - Custom Properties from Text File?
Now that's just cheating!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.
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/
Re: Drawings - Custom Properties from Text File?
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.
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
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
Re: Drawings - Custom Properties from Text File?
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 ; I am seeing some automation that I had not even considered utilizing...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/
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.
- DanPihlaja
- Posts: 842
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 807
- x 978
Re: Drawings - Custom Properties from Text File?
yes please
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
Re: Drawings - Custom Properties from Text File?
Looks really interesting.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.
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
- DanPihlaja
- Posts: 842
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 807
- x 978
Re: Drawings - Custom Properties from Text File?
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.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
https://www.codestack.net/solidworks-do ... nager-api/
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14
Re: Drawings - Custom Properties from Text File?
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".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 did actually find a ZIP for "BatchCustomProp.exe" in the comments to the Solidworks Forum posting. Am i allowed to post the ZIP file?
Re: Drawings - Custom Properties from Text File?
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: The help file:
Batch Custom Properties Program V033\Batch Custom Properties - Help.pdf
"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: The help file:
Batch Custom Properties Program V033\Batch Custom Properties - Help.pdf
- DanPihlaja
- Posts: 842
- Joined: Thu Mar 11, 2021 9:33 am
- Location: Traverse City, MI
- x 807
- x 978
Re: Drawings - Custom Properties from Text File?
I am probably wrong. I thought it was a stand alone application. My bad.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
-Dan Pihlaja
Solidworks 2022 SP4
2 Corinthians 13:14
Solidworks 2022 SP4
2 Corinthians 13:14