Equation function "INT" doesn't seem to work

User avatar
charlesculp
Posts: 11
Joined: Fri Mar 26, 2021 3:52 pm
Answers: 0
x 1
x 12

Equation function "INT" doesn't seem to work

Unread post by charlesculp »

Am I missing something? I am trying to add an extra sheet at the end of all drawings. Because it is not part of the drawing itself, I need the page count for the drawing to be less than the actual calculated page count. I tried to use an equation in the custom properties to make this happen.

To do this, it does some math, but it looks like it turns it into a floating point number, and uses the length unit standard tolerance for significant digits (three past the .). Ok, so I used the "int" function, but it does nothing. What gives?

Shouldn't

Code: Select all

int ( $PRP:"SW-Total Sheets" - 1 )
return an integer? Solidworks 2022 SP5.0

image.png
User avatar
jcapriotti
Posts: 1854
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1196
x 1984

Re: Equation function "INT" doesn't seem to work

Unread post by jcapriotti »

Hey Charles, long time.

I don't see a way to make this work with the equations in custom properties. The INT function is working somewhat if you put a decimal value in like 5.523, it changes it to 5.000. Excel does the same thing if you have decimal place formatting set on the cell.
image.png
image.png (6.18 KiB) Viewed 337 times
Jason
User avatar
JSculley
Posts: 641
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 874

Re: Equation function "INT" doesn't seem to work

Unread post by JSculley »

Yeah, the INT function is borked. You wouldn't be bothering with this at all if this SPR were addressed:

SPR769752 - Ability to set certain drawing sheets to be ignored from total sheet count
User avatar
charlesculp
Posts: 11
Joined: Fri Mar 26, 2021 3:52 pm
Answers: 0
x 1
x 12

Re: Equation function "INT" doesn't seem to work

Unread post by charlesculp »

JSculley wrote: Fri Nov 08, 2024 1:20 pm Yeah, the INT function is borked. You wouldn't be bothering with this at all if this SPR were addressed:

SPR769752 - Ability to set certain drawing sheets to be ignored from total sheet count
Nice, I will +1 that SPR.

Nice to hear from you, Jason. Back doing engineering work again after a decade as a manager.
User avatar
josh
Posts: 293
Joined: Thu Mar 11, 2021 1:05 pm
Answers: 16
x 22
x 500

Re: Equation function "INT" doesn't seem to work

Unread post by josh »

I hope that's an old pic you're using there for your profile... I've considered you somewhat of a colleauge for almost as many years as you look old in that pic.
User avatar
gupta9665
Posts: 407
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 427
x 447

Re: Equation function "INT" doesn't seem to work

Unread post by gupta9665 »

You may have to use a macro that counts the total sheet, subtract 1 and update the custom property. Downside, run macro every time you add/remove a sheet. A macro or add-in to run in the background and act on file save might help updating the sheet count.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
charlesculp
Posts: 11
Joined: Fri Mar 26, 2021 3:52 pm
Answers: 0
x 1
x 12

Re: Equation function "INT" doesn't seem to work

Unread post by charlesculp »

josh wrote: Fri Nov 08, 2024 5:18 pm I hope that's an old pic you're using there for your profile... I've considered you somewhat of a colleauge for almost as many years as you look old in that pic.
That was at least four haircuts ago. I had to get it trimmed when I started going on job interviews. It's all still there, though. The picture is from 2021, I believe.

My solution was to do this Solidworks PDM Dispatch Action (during check-out) by creating two variables, one that is the $PRP:"Total Sheets" and the other is the new calculated value. It determines if there is the attached change sheet at the end, and then if there is it subtracts a page from the total. This afternoon I will make it work for a variable number of change sheets; in case the designer gets ambitious and makes multiple pages worth of changes at a time.
image.png
User avatar
AlexLachance
Posts: 2177
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2355
x 2010

Re: Equation function "INT" doesn't seem to work

Unread post by AlexLachance »

JSculley wrote: Fri Nov 08, 2024 1:20 pm Yeah, the INT function is borked. You wouldn't be bothering with this at all if this SPR were addressed:

SPR769752 - Ability to set certain drawing sheets to be ignored from total sheet count
So um, I'm trying to vote on this SPR, but can't seem to find where anymore. I used to do it through the Knowledge base but it doesn't seem to work anymore, I get the search result, but can't vote on it. I tried looking up on the Platform but didn't find any topic on the platform linked to it either...
image.png
https://support.3ds.com/knowledge-base/ ... :SPR769752

Edit: Is it the badge on the right of the title to "Add to Favorites" that counts as a vote? If so, that is truely intuitive, feels just as intuitive as the platform.
Post Reply