3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

Spaceclaim: WriteBlock problem


    • seghier


      I use an external python editor to send some commands to Spaceclaim but for some commands like:


      i got this error message:

      Runtime error (InvalidOperationException): Write calls are only allowed inside a write block.

      How i can solve this problem with write block?

    • Aniket
      Ansys Employee
      This should be doable using something on the following lines:
      from SpaceClaim.Api.V19 import Taskas NewTask
      from SpaceClaim.Api.V19 importWriteBlock

      def myfunction():
      # your code here
      WriteBlock.ExecuteTask('Running myFunction', myTask)
      How to access Ansys help links
      Guidelines for Posting on Ansys Learning Forum
    • seghier
      Thank you
      Works fine , thank you very much Aniket
    • seghier
      Hi Aniket , can you help me here

      I tried to create a Point from external python editor using direct command and using task but the same error message appears:
      Runtime error (NullReferenceException): Object reference not set to an instance of an object.
    • seghier
      I tried this in a custom addin but no curvepoint created.
      Is there another way to create CurvePoint without using SketchPoint?

Viewing 4 reply threads
  • You must be logged in to reply to this topic.