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

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

Sydra7
Contributor Contributor
752 Görüntüleme
4 Yanıt
Mesaj 1 / 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 Beğeni
Kabul edilen çözümler (2)
753 Görüntüleme
4 Yanıt
Replies (4)
Mesaj 2 / 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 Beğeni
Mesaj 3 / 5

andrzej_trelinski
Autodesk
Autodesk
Kabul edilen çözüm

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 Beğeni
Mesaj 4 / 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 Beğeni
Mesaj 5 / 5

jeremy_tammik
Alumni
Alumni
Kabul edilen çözüm

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 Beğeni