Generating Hatch Pattern and Units

hi everybody,

i am using an amazing Dynamo graph to create hatches from lines by @dcmasten1.
Until yesterday, it was working perfectly well. Today I started having a problem: The .pat-file generated used a colon to separate decimals, which obviously caused an error (0,600000 instead of 0.6 for example). That didnt happen yesterday and I dont understand why since i didnt Change anything - at least on Purpose. Does someone have an idea why this is Happening? Cheers!

Project1.rvt (1.3 MB)
Ultra Hatch.dyn (139.8 KB) …

Here is my output using the files you provided:

image.

Your output is most likely due to the localized version you are using which formats numbers as 1000,00 instead of 1000.00. You can convert each of the numbers to strings and replace all commas with decimals like this:

3 Likes

Strange, I can’t seem to replicate the same error.
@bialmeida, I think I might have to agree with @cgartland about your localized version.
Here is my output using MM. It is exactly 1,000 units smaller.

;%UNITS=MM
;%VERSION=3.0

*name, description,
;%TYPE=MODEL
90, 600,0, 2399.960015,2400, 2399.960015
-90, 1200,2399.960015, -2399.960015,2400, 2399.960015
90, 1800,0, 2399.960015,2400, 2399.960015
0, 600,2024.940022, 0,2399.960015, 600,-1800
0, 600,1874.960014, 0,2399.960015, 600,-1800
0, 0,1349.960014, 0,2399.960015, 600,-1800
0, 0,1199.980007, 0,2399.960015, 600,-1800
0, 600,824.960015, 0,2399.960015, 600,-1800
0, 600,674.980007, 0,2399.960015, 600,-1800
0, 0,149.980007, 0,2399.960015, 600,-1800
0, 0,0, 0,2399.960015, 2400
-90, 0,2399.960015, -2399.960015,2400, 2399.960015
180, 2400,2399.960015, 0,-2399.960015, 2400
90, 2400,0, 2399.960015,2400, 2399.960015
0, 1800,2024.940022, 0,2399.960015, 600,-1800
0, 1800,1874.960014, 0,2399.960015, 600,-1800
0, 1800,824.960015, 0,2399.960015, 600,-1800
0, 1800,674.980007, 0,2399.960015, 600,-1800
0, 1200,1349.960014, 0,2399.960015, 600,-1800
0, 1200,1199.980007, 0,2399.960015, 600,-1800
0, 1200,149.980007, 0,2399.960015, 600,-1800

And it does work as a hatch pattern!
To be fair, I had to convert your file to Revit 2020, but I have doubts about whether the upgrade would have solved the issue. However, you might also try out this trick: When I converted the units to Meters in the Manage - Settings Tab, my output went to decimals, shrinking it by… 1,000 units. That may be an easy workaround, but if you happen to narrow down the root cause of the issue on your own, please let us know what it was!

1 Like

I still have a file where it works and another one where it doesnt, which allows me to compare and hopefully helps… the Project Units are identical in both cases, both revit 2019. I dont know which other Settings could cause this Problem.

The first Image Comes from the “broken” file and seems to get an Input of 0.7 and an Output of 0,700000 under Longest Line Family. Any idea why this would happen? Thanks!!


Our IT-Admin found the error, you guys are right: Regional Settings – Additional Settings – Decimal Symbol - which is normally set to a comma in Germany… I solved the problem as i could - i am a beginner, so not sure if its the ideal solution - but I followed @cgartland’s suggestion and it works :slight_smile: I had to put a colon between the values first though, so that i could replace all commas with a period, then i replaced the colons with a comma in the end. Thanks guys!


2 Likes