Create.NewLineBoundaryConditions(...) function don't works well!

Create.NewLineBoundaryConditions(...) function don't works well!

Sydra7
Contributor Contributor
751 Views
4 Replies
Message 1 of 5

Create.NewLineBoundaryConditions(...) function don't works well!

Sydra7
Contributor
Contributor

If I create a line boundary condition only the x translation value goes throught the API ... other translation values be 0. What can be the problem? Is there a solution to that?

 

More information on the attached picture!

0 Likes
Accepted solutions (2)
752 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

Dear Sydra7,

Thank you for your query.

Sounds interesting, and a bit worrying.

Could you please provide a reproducible case for us to explore in more depth?

Please describe exactly what you are trying to achieve, and how, and what behaviour you are observing.

The best and clearest way to do so and enable us to share the description with the development team is by providing a minimal sample project and a reproducible test case, i.e.

  • A complete yet minimal Revit sample model to run a test in.
  • A complete yet minimal Visual Studio solution with add-in manifest so that we can compile, load and run the application with a single click and explore its behaviour live in the sample model you provide.
  • Detailed step-by-step instructions for reproducing the issue.
  • Specification of the exact behaviour you observe versus what you expect.

When sending us sample material, please do not include any information that you consider to be confidential or a trade secret to your company. Thank you!

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 5

andrzej_trelinski
Autodesk
Autodesk
Accepted solution

Hi Sydra7,

I confirm it is bug.
Workaround for problem is:
BoundaryConditions bc = doc.NewLineBoundaryConditions(…);
Parameter X = bc.get_Parameter(BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_X);
X.Set(valueX);
Parameter Y = bc.get_Parameter(BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_Y);
Y.Set(valueY);
Parameter Z = bc.get_Parameter(BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_Z);
Z.Set(valueZ);
Parameter XRot = bc.get_Parameter(BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_ROT_X);
XRot(valueRot);

Regards,
Andrzej Trelinski
Revit Structure Developer

0 Likes
Message 4 of 5

jeremy_tammik
Alumni
Alumni

Dear Sydra7,


Thank you for the reproducible case!

 

The issue is now resolved in the development stream, and the current plan is to provide a public fix for it in an update release of Revit 2015.

 

Best regards,

 

Jeremy

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni
Accepted solution

Dear David,

 

As I already mentioned in a separate email to you, the following workaround should enable you to resolve the issue immediately:

 

Issue: BoundaryConditions::createBoundaryConditions() method has invalid parameters assigned to for linear BC.

 

Workaround: Manually set the linear constraint parameters just after invoking the NewLineBoundaryConditions method:

 

  Parameter X_TranslationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_X);

  X_TranslationSpringModulus.Set(value);

  Parameter Y_TranslationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_Y);

  Y_TranslationSpringModulus.Set(value);

  Parameter Z_TranslationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_Z);

  Z_TranslationSpringModulus.Set(value);

  Parameter X_RotationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_LINEAR_RESTRAINT_ROT_X);

  X_RotationSpringModulus.Set(value);

 

where:

 

  • element is a newly created Boundary condition element,
  • value is a value passed to NewLineBoundaryConditions() method.

Issue: BoundaryConditions::createBoundaryConditions() method has invalid parameters assigned to for area BC.

 

Workaround: Manually set the area constraint parameters just after invoking the NewLineBoundaryConditions method:

 

  Parameter X_TranslationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_AREA_RESTRAINT_X);

  X_TranslationSpringModulus.Set(value);

  Parameter Y_TranslationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_AREA_RESTRAINT_Y);

  Y_TranslationSpringModulus.Set(value);

  Parameter Z_TranslationSpringModulus = GetParameter(element,
    BuiltInParameter.BOUNDARY_AREA_RESTRAINT_Z);

  Z_TranslationSpringModulus.Set(value);

 

where:

  • element is a newly created Area Boundary Condition element,
  • value is a value passed to NewLineBoundaryConditions() method.

Can you please try this out and let us know whether it resolves the issue for you?

 

Thank you!

 

Best regards,

 

Jeremy

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes