{"id":547,"date":"2022-03-11T23:17:30","date_gmt":"2022-03-12T02:17:30","guid":{"rendered":"https:\/\/ricaun.com\/?p=547"},"modified":"2022-03-15T21:40:01","modified_gmt":"2022-03-16T00:40:01","slug":"create-globalparameter-error","status":"publish","type":"post","link":"https:\/\/ricaun.com\/br\/create-globalparameter-error\/","title":{"rendered":"Create GlobalParameter Error"},"content":{"rendered":"<p>This week I was testing a package extension to make parameters and Revit a little easier to work. <\/p>\n\n\n\n<p>To test if the library is working like intended I create a little tester to generate all parameters with the available types and tested with SharedParameter and GlobalParameter.<\/p>\n\n\n\n<p>In the end, the script throws some errors when creating the GlobalParameter on Revit 2022. Some SpecTypeId throws an exception when trying to create a parameter: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ricaun.com\/wp-content\/uploads\/2022\/03\/Error.png\" alt=\"\" class=\"wp-image-553\" width=\"449\" height=\"316\" srcset=\"https:\/\/ricaun.com\/wp-content\/uploads\/2022\/03\/Error.png 898w, https:\/\/ricaun.com\/wp-content\/uploads\/2022\/03\/Error-300x211.png 300w, https:\/\/ricaun.com\/wp-content\/uploads\/2022\/03\/Error-768x541.png 768w, https:\/\/ricaun.com\/wp-content\/uploads\/2022\/03\/Error-18x12.png 18w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\n\n\n\n<p>This happens only on 16 ForgeTypeIds below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>autodesk.spec.aec.electrical:costRateEnergy-2.0.0\nautodesk.spec.aec.electrical:costRatePower-2.0.0\nautodesk.spec.aec.electrical:powerPerLength-2.0.0\nautodesk.spec.aec.energy:heatCapacityPerArea-2.0.0\nautodesk.spec.aec.energy:isothermalMoistureCapacity-2.0.0\nautodesk.spec.aec.energy:thermalGradientCoefficientForMoistureCapacity-2.0.0\nautodesk.spec.aec.hvac:angularSpeed-2.0.0\nautodesk.spec.aec.hvac:diffusivity-2.0.0\nautodesk.spec.aec.hvac:flowPerPower-2.0.0\nautodesk.spec.aec.hvac:massPerTime-2.0.0\nautodesk.spec.aec.hvac:powerPerFlow-2.0.0\nautodesk.spec.aec.infrastructure:stationingInterval-2.0.0\nautodesk.spec.aec.piping:massPerTime-2.0.0\nautodesk.spec.aec:costPerArea-2.0.0\nautodesk.spec.aec:distance-2.0.0\nautodesk.spec.aec:rotationAngle-2.0.0<\/code><\/pre>\n\n\n\n<p>I&#8217;m using the Revit 2022 build version 22.0.2.392, that&#8217;s means could be possible for the last hotfix to fix this issue, don&#8217;t care too much, by the look is some newer parameters type added in this version.<\/p>\n\n\n\n<p>The strange part is the SharedParameter test works fine with this SpecTypeId.<\/p>\n\n\n\n<p>Revit 2023 gonna remove the ParameterType and that&#8217;s a big deal if you have some ParameterType around in your code. Definitely gonna break and gonna be a pain to update to the next version.<\/p>\n\n\n\n<p>That&#8217;s why I&#8217;m creating an extension to make this transaction between versions more simple. I predict the BuiltInParameterGroup and BuiltInParameter gonna become Obsolete on the next version. <\/p>\n\n\n\n<p>On Revit 2022 Api BuiltInParameterGroup already has some ForgeTypeId connection, maybe on Revit 2023 or next.<\/p>\n\n\n\n<p>Here is the link for the Autodesk Forum: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/forums.autodesk.com\/t5\/revit-api-forum\/globalparameter-create-error-spectypeid-revit-22-0-2-392\/td-p\/10998925\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/forums.autodesk.com\/t5\/revit-api-forum\/globalparameter-create-error-spectypeid-revit-22-0-2-392\/td-p\/10998925<\/a><\/li><\/ul>\n\n\n\n<p>See yaa!<\/p>","protected":false},"excerpt":{"rendered":"<p>This week I was testing a package extension to make parameters and Revit a little easier to work. To test if the library is working like intended I create a little tester to generate all parameters with the available types and tested with SharedParameter and GlobalParameter. In the end, the script throws some errors when&hellip;&nbsp;<a href=\"https:\/\/ricaun.com\/br\/create-globalparameter-error\/\" class=\"\" rel=\"bookmark\">Continue a ler &raquo;<span class=\"screen-reader-text\">Create GlobalParameter Error<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":568,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","_ti_tpc_template_sync":false,"_ti_tpc_template_id":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-547","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-revit-api"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts\/547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/comments?post=547"}],"version-history":[{"count":3,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts\/547\/revisions"}],"predecessor-version":[{"id":556,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/posts\/547\/revisions\/556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/media\/568"}],"wp:attachment":[{"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/media?parent=547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/categories?post=547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ricaun.com\/br\/wp-json\/wp\/v2\/tags?post=547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}