A checkbox in PDM can only store a in a 'number' field a 1 (checked) or a 0 (unchecked)
the same checkbox from the property tab builder (for a custom property) can store any text value for being checked or unchecked in a text field - if you use a 1 and a 0 this works flawlessly with PDM in either direction
Now I want to show this 'checkbox' in my drawings. To make it easy I thought to add something to the sheet format of our drawings which gets replaced every time we copy tree/branch etc. through PDM - plus it will be visible on all our new drawings.
Problem:
I can only use a general table on the sheet but NOT on the sheet format - thus I can not use equations to change the 1/0 to something else (if statement not possible)
If I use an input formula as seen here it only works one way, meaning it only works if I use the check mark on the datacard. It does not work if I use it within the properties of the component
my only option seems to be to make a macro that inserts a general table to an anchor point & to convert the 1/0 to something else with an if statement in that table OR leave the 1/0 in in there
Did I miss something? Is there another option to solve this? I JUST want a check box on the datacard that does the same thing my check box in the property tab does. Is that too much?
I think that without the use of a custom macro or add-in, that you'll have trouble pushing changes back to PDM from the drawing template.
The way that we got around that for something similar on our template was to put the check-box in our custom add-in. This drives the change to PDM and also evaluates the drawing to determine which of two blocks to show. The checked and unchecked blocks are always on the template. We have one hidden and the other showing based on which setting is selected.
Edit: I may be misunderstanding your intent as well, so take all this with a grain of salt. An example file or a few pictures of what you're looking for will help.
berg_lauritz wrote: ↑Wed Nov 10, 2021 12:50 pm
[*]If I use an input formula as seen here it only works one way, meaning it only works if I use the check mark on the datacard. It does not work if I use it within the properties of the component.
Sounds like you are modifying custom properties manually from the model/drawing? Why wouldn't you use the PDM data card from with SolidWorks?
jcapriotti wrote: ↑Thu Nov 11, 2021 8:22 am
Sounds like you are modifying custom properties manually from the model/drawing? Why wouldn't you use the PDM data card from with SolidWorks?
jcapriotti wrote: ↑Fri Nov 12, 2021 11:33 am
In the PDM add-in on the right, select the file in the tree and then "Show Properties".
image.png
Ah, okay. But I cannot batch-edit those custom properties across multiple files without another add-in, can I?
Also - linking dimensions etc. to custom properties does not work through the data card. So I'd have to work in two places anyway. And I could have it in one place.
Not sure I follow what you want to do regarding batch editing. Is it for data migration? Could you explain you use case?
Once you dimensions are linked, there is nothing more to edit in the file. You could have some SolidWorks properties that you don't control with the PDM data card, you could use the Property tab for that.
For us we don't use the PDM data card inside SolidWorks since we have some complex requirements. We developed our own "Property Editor" tool. It reads the custom properties but also some PDM values via the PDM api. Then, when applying, it pushes data to the custom properties, some to PDM only fields, some to SolidWorks only properties.
jcapriotti wrote: ↑Fri Nov 12, 2021 11:53 am
Not sure I follow what you want to do regarding batch editing. Is it for data migration? Could you explain you use case?
Once you dimensions are linked, there is nothing more to edit in the file. You could have some SolidWorks properties that you don't control with the PDM data card, you could use the Property tab for that.
For us we don't use the PDM data card inside SolidWorks since we have some complex requirements. We developed our own "Property Editor" tool. It reads the custom properties but also some PDM values via the PDM api. Then, when applying, it pushes data to the custom properties, some to PDM only fields, some to SolidWorks only properties.
Sounds similar to i.e. CustomTools.
The idea is to show a check box on a drawing. I can do a workaround but it only pushes the update from the data card to the drawing & not the other way around.
We are currently not in a position to justify another expense without showing some improvements first. So we'll have to live with that for now.
On further thought, I think you are going to have to work in two place, the data is just different. I wouldn't put data on the PDM data card that the drawing only needs and you don't care about searching in PDM. Not ideal but you can use the PDM data card with something like the property tab builder (or just use the raw custom properties dialogue).