Giter Site home page Giter Site logo

Comments (5)

3x380V avatar 3x380V commented on July 22, 2024

A naive solution looks like:

diff --git a/src/Mod/BIM/bimcommands/BimPreflight.py b/src/Mod/BIM/bimcommands/BimPreflight.py
index 9e3434217c..4453f16fa6 100644
--- a/src/Mod/BIM/bimcommands/BimPreflight.py
+++ b/src/Mod/BIM/bimcommands/BimPreflight.py
@@ -894,7 +894,7 @@ class BIM_Preflight_TaskPanel:
                     "\n"
                     + translate(
                         "BIM",
-                        "Verify which properties a certain property set must contain on http://www.buildingsmart-tech.org/ifc/IFC4/Add2/html/annex/annex-b/alphabeticalorder_psets.htm",
+                        "Verify which properties a certain property set must contain on https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/annex/annex-b/alphabeticalorder_psets.htm",
                     )
                     + "\n\n"
                 )
diff --git a/src/Mod/BIM/utils/buildPsets.py b/src/Mod/BIM/utils/buildPsets.py
index 4e8d508344..f00f41b9d5 100644
--- a/src/Mod/BIM/utils/buildPsets.py
+++ b/src/Mod/BIM/utils/buildPsets.py
@@ -33,7 +33,7 @@ MAXTRIES = 3
 # read the pset list
 print("Getting psets list...")
 u = urllib2.urlopen(
-    "http://www.buildingsmart-tech.org/ifc/IFC4/Add2/html/annex/annex-b/alphabeticalorder_psets.htm"
+    "https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/annex/annex-b/alphabeticalorder_psets.htm"
 )
 p = u.read()
 u.close()
@@ -47,7 +47,7 @@ for i, pset in enumerate(psets):
     for j in range(MAXTRIES):
         try:
             u = urllib2.urlopen(
-                "http://www.buildingsmart-tech.org/ifc/IFC4/Add2/html/psd/Pset_"
+                "https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/psd/Pset_"
                 + pset
                 + ".xml"
             )

from freecad.

yorikvanhavre avatar yorikvanhavre commented on July 22, 2024

The IFC documentation has the bad habit of changing locations quite often :)
And there is unfortunately apparently no "default" location that would "always work".

I think we could maybe define an IFC_DOCS_ROOT_URL variable somewhere to be used everywhere in BIM so it's easy to update next time

from freecad.

3x380V avatar 3x380V commented on July 22, 2024

Agree. And as it turns out translations would change with IFC_DOCS_ROOT_URL, I think we should change urls in all translated strings to something like this

translate(
    "BIM",
    "Verify which properties a certain property set must contain on %1",
).replace("%1", IFC_DOCS_ROOT_URL + "/annex/annex-b/alphabeticalorder_psets.htm")

to save touching them on random url change. As talk is cheap, I'll prepare PR for that.

from freecad.

yorikvanhavre avatar yorikvanhavre commented on July 22, 2024

That would be cool! Yes, please do! Thanks!!

from freecad.

3x380V avatar 3x380V commented on July 22, 2024

Done as #14258. Please note that only buildPsets.py is tested while patch changing translation strings is not.

from freecad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.