Page 1 of 1

Why does it come like this?

Posted: Mon Sep 27, 2021 5:36 pm
by Maha Nadarasa
This a continuation from "Solidworks Sequential Numbering" (https://www.cadforum.net/viewtopic.php? ... RRAY#p5723) changing the original file name (from Part2 to PA) and opening and closing the feature LPattern6, giving this results. Notice array of D. What is the reason?

Re: Why does it come like this?

Posted: Tue Sep 28, 2021 4:11 am
by mp3-250
The original part was in inches and you are using a system in mm maybe?
Try to play with the units.

Re: Why does it come like this?

Posted: Tue Sep 28, 2021 8:17 am
by MJuric
Maha Nadarasa wrote: Mon Sep 27, 2021 5:36 pm This a continuation from "Solidworks Sequential Numbering" (https://www.cadforum.net/viewtopic.php? ... RRAY#p5723) changing the original file name (from Part2 to PA) and opening and closing the feature LPattern6, giving this results. Notice array of D. What is the reason?
No idea and can't probably open your part, still on 2018.

What was in the text originally? When I was doing that I found a whole lot of weirdness so having it pull a random letter from somewhere would not surprise me.

Re: Why does it come like this?

Posted: Tue Sep 28, 2021 8:18 am
by mattpeneguy
You should be grateful...If SW worked reliably and didn't have bugs like this for you to sort out, then your employer could hire any lackey to do CAD work...Just think of this bug as job security....

Kidding aside...that's weird. If you open the Custom Properties and edit the sketch it "fixes" it. But, I wouldn't rely on this not breaking in the future. Can you send the file to your VAR? Fixing this should be trivial, but it'll require an SPR and some attention from the SW developers.

Re: Why does it come like this?

Posted: Tue Sep 28, 2021 8:32 am
by Maha Nadarasa
MJuric wrote: Tue Sep 28, 2021 8:17 am No idea and can't probably open your part, still on 2018.

What was in the text originally? When I was doing that I found a whole lot of weirdness so having it pull a random letter from somewhere would not surprise me.
I do not have 2018v but you can try this with your version. Only thing is, you have to do what I did.

-change the name of the file
-Just open and close the LPattern6

Re: Why does it come like this?

Posted: Tue Sep 28, 2021 8:38 am
by SPerman
mattpeneguy wrote: Tue Sep 28, 2021 8:18 am Fixing this should be trivial, but it'll require an SPR and some attention from the SW developers.
Fixing this should be trivial, but getting the SW developers attention certainly is not.

Re: Why does it come like this?

Posted: Tue Sep 28, 2021 8:55 pm
by mp3-250
If you have renamed the part from windows explorer instead of using "save as" inside SW, probably the pointers inside the part properties will still try to lookup at the old filename @part.sldprt instead of the new one @p2.sldprt . If you open and close the property window (the icon near the option "gear" on the top toolbar) it triggers the regeneration of sketch 7 and 8.

I think it could be "by design" because SW seems to store inside the file absolute path pointers (ie pointing at a certain filename in a certain place instead of a generic "current part") . I saw this kind of behaviour in some bugged parts that shown out of nowhere properties sort of linked to other parts...

Re: Why does it come like this?

Posted: Wed Sep 29, 2021 8:15 am
by MJuric
mp3-250 wrote: Tue Sep 28, 2021 8:55 pm If you have renamed the part from windows explorer instead of using "save as" inside SW, probably the pointers inside the part properties will still try to lookup at the old filename @part.sldprt instead of the new one @p2.sldprt . If you open and close the property window (the icon near the option "gear" on the top toolbar) it triggers the regeneration of sketch 7 and 8.

I think it could be "by design" because SW seems to store inside the file absolute path pointers (ie pointing at a certain filename in a certain place instead of a generic "current part") . I saw this kind of behaviour in some bugged parts that shown out of nowhere properties sort of linked to other parts...
That's pretty much what I tumbled too when I was working on it. There are few other combinations of actions that seem to force a rebuild, can't remember what they were, but most of those were not 100% and were more complex. Opening the file properties window and closing it seemed to work 100% of the time and was only one click.

Seems completely wrong that opening the file properties window would do something that a rebuild does not....but it is Solidworks :lol:

Re: Why does it come like this?

Posted: Wed Sep 29, 2021 8:24 am
by JSculley
It isn't 'D'. It is:
image.png
The line to which the text is attached is short, so the text is truncated. The text is linked to the 'old' value of the property from before the file rename, which doesn't evaluate to anything in the newly named file so the text shows the 'raw' value. The only way to get the file to update seems to be to open the File Properties dialog, which shows the correct file name in the property 'Value/Text Expression' field. The text will update correctly even if you Cancel the Properties dialog.

Re: Why does it come like this?

Posted: Wed Sep 29, 2021 9:35 am
by MJuric
JSculley wrote: Wed Sep 29, 2021 8:24 am It isn't 'D'. It is:

image.png

The line to which the text is attached is short, so the text is truncated. The text is linked to the 'old' value of the property from before the file rename, which doesn't evaluate to anything in the newly named file so the text shows the 'raw' value. The only way to get the file to update seems to be to open the File Properties dialog, which shows the correct file name in the property 'Value/Text Expression' field. The text will update correctly even if you Cancel the Properties dialog.
Nice! That makes sense. I actually had a similar issue on how not to show decimal places. So for instance if I shortened it enough to show only one digit if I had 10 rows or columns it would only show "1". If I made it short enough to show 2 digits it would show "1." for single digits. I can't remember now but somewhere you have to set the decimal places to "none"...I think it may be the linear units.

Also I never have figured how to make this do "A,B,C". I think the only possible way is to create a special font where the alphabet is shown rather than numbers. But I haven't tried that yet.

Re: Why does it come like this?

Posted: Wed Sep 29, 2021 8:32 pm
by mp3-250
MJuric wrote: Wed Sep 29, 2021 8:15 am That's pretty much what I tumbled too when I was working on it. There are few other combinations of actions that seem to force a rebuild, can't remember what they were, but most of those were not 100% and were more complex. Opening the file properties window and closing it seemed to work 100% of the time and was only one click.

Seems completely wrong that opening the file properties window would do something that a rebuild does not....but it is Solidworks :lol:
try to replace in the properties

"D2@Sketch7@Part1.SLDPRT" with "D2@Sketch7" (same for Sketch8)

save and close the part. copy and rename it on the desktop a couple of times and it regenerate correctly everytime since.

Re: Why does it come like this?

Posted: Thu Sep 30, 2021 8:35 am
by MJuric
mp3-250 wrote: Wed Sep 29, 2021 8:32 pm try to replace in the properties

"D2@Sketch7@Part1.SLDPRT" with "D2@Sketch7" (same for Sketch8)

save and close the part. copy and rename it on the desktop a couple of times and it regenerate correctly everytime since.
I'll have to try that. I have this in a driveworks model and if I can make it regen off the model that's one less thing I have to "Fix"