Property tab check box & PDM check box

Discuss SolidWorks PDM
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Property tab check box & PDM check box

Unread post by berg_lauritz »

I just stumbled upon this:
  • 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? grumph
User avatar
AlexB
Posts: 452
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 24
x 243
x 401

Re: Property tab check box & PDM check box

Unread post by AlexB »

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.
User avatar
jcapriotti
Posts: 1795
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1138
x 1942

Re: Property tab check box & PDM check box

Unread post by jcapriotti »

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?
Jason
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Property tab check box & PDM check box

Unread post by berg_lauritz »

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?
From within SolidWorks? How????? :shock: :o

Please, master, show me! oa
User avatar
jcapriotti
Posts: 1795
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1138
x 1942

Re: Property tab check box & PDM check box

Unread post by jcapriotti »

berg_lauritz wrote: Fri Nov 12, 2021 8:56 am From within SolidWorks? How????? :shock: :o

Please, master, show me! oa
In the PDM add-in on the right, select the file in the tree and then "Show Properties".
image.png
Jason
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Property tab check box & PDM check box

Unread post by berg_lauritz »

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.
User avatar
jcapriotti
Posts: 1795
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1138
x 1942

Re: Property tab check box & PDM check box

Unread post by jcapriotti »

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.
Jason
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 441
x 235

Re: Property tab check box & PDM check box

Unread post by berg_lauritz »

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.

Edit: Thank you for all the input!
User avatar
jcapriotti
Posts: 1795
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1138
x 1942

Re: Property tab check box & PDM check box

Unread post by jcapriotti »

What do you want to appear on the drawing, a Yes / No instead of 0/1?
Jason
User avatar
jcapriotti
Posts: 1795
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1138
x 1942

Re: Property tab check box & PDM check box

Unread post by jcapriotti »

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).
Jason
Post Reply