Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ceiling by sketch and shape editing tools

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
634 Views, 7 Replies

Ceiling by sketch and shape editing tools

Hi,


Im trying to remap the edit sketch command for revision clouds to my own implementation.
Im able to get the RevitCommandId by using:

 

RevitCommandId.LookupCommandId()

I create the AddinCommandBinding, but the events that I subscribe to are never raised. 

 

Is there something Im missing here? You cant bind to Edit Sketch?

Thanks

 

Erik

7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Some addition information:
I've gotten the CanExecute event to fire, but nothing else.
Message 3 of 8
Anonymous
in reply to: Anonymous

Also, everytime the CanExecute event is raised, revit exits unexpectedly. Eventhough there is no code in the called method.
Doesnt matter if the debugger is attached or not.

Message 4 of 8
jeremytammik
in reply to: Anonymous

Dear Erik,

 

Thank you for your report.

 

I would like to pass it on to the development team for further analysis and comment.

 

In order to do so, we require a complete reproducible case including a minimal sample model, minimal Revit API macro code to reproduce the issue, an exact description of the expected versus the observed behaviour, and detailed step-by-step instructions how to drive it:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

Thank you!

 

Best regards,

 

Jeremy



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

Message 5 of 8
Anonymous
in reply to: jeremytammik

Hi Jeremy,
ok. I will set it up.
You want it as a document macro right?

/Erik
Message 6 of 8
jeremytammik
in reply to: Anonymous

Dear Erik,

 

Thank you very much!

 

Yes please.

 

That is what the development team prefer, since they have no C# add-in development environment set up.

 

Cheers,

 

Jeremy



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

Message 7 of 8
Anonymous
in reply to: jeremytammik

Okey I've setup an testfile with a document macro. Its attached to this post.


By the way Jeremy, did you rename the forum post?
I have not tested anything with edit sketch on ceilings, only on revision clouds.
However judging from the name of the command (" Dialog_Essentials_SketchEdit:Control_Essentials_EditSketch ") it looks like it could be the same command though...


/Erik

Message 8 of 8
jeremytammik
in reply to: Anonymous

Dear Erik,

 

Thank you very much!

 

What forum post do you mean?

 

I cannot rename or change the title or description of threads here in the Revit API forum, if that is what you mean.

 

You must have clicked something unintentionally when you initially started this thread.

 

That happened to me once too...

 

What would you like the description to be, please?

 

Maybe that will help understand your issue better...

 

Just for the sake of completeness and to enable search engines to find this thread more easily, here is the macro source code you provided:

 

  public void RegisterAddinCommandBinding()
  {
    // I Have found two different command ids that look
    // promising.
    // This one: IDR_SKETCH_OBJECTS_REVISION_CLOUD does
    // not raise any events that I can see.
    // It does not return null though.
   
    //var revitCommandId = RevitCommandId.LookupCommandId(
    //  "IDR_SKETCH_OBJECTS_REVISION_CLOUD");
 
    // This will raise the CanExecute event.
    // But that is it. It also crashes Revit if you
    // debug it in Visual Studio after the event
    // handler returns.
   
    var revitCommandId = RevitCommandId.LookupCommandId(
      "Dialog_Essentials_SketchEdit:Control_Essentials_EditSketch");
     
    var binding = this.Application.CreateAddInCommandBinding(
      revitCommandId);
 
    binding.BeforeExecuted+=Binding_BeforeExecuted;
    binding.Executed+=Binding_Executed;
    binding.CanExecute+= Binding_CanExecute;
  }
   
  private void Binding_Executed(
    object sender,
    Autodesk.Revit.UI.Events.ExecutedEventArgs e)
  {
  }
 
  private void Binding_BeforeExecuted(
    object sender,
    Autodesk.Revit.UI.Events.BeforeExecutedEventArgs e)
  {
  }
 
  private void Binding_CanExecute(
    object sender,
    Autodesk.Revit.UI.Events.CanExecuteEventArgs e)
  {
  }

 

I logged the issue REVIT-99920 [CreateAddInCommandBinding with SketchEdit crashes Revit] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.

 

This issue is important to me. What can I do to help?

 

This issue needs to be assessed by our engineering team, and prioritised against all of the other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:

 

  • Impact on your application and/or your development.
  • The number of users affected.
  • The potential revenue impact to you.
  • The potential revenue impact to Autodesk.
  • Realistic timescale over which a fix would help you.
  • In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.

 

This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 

Cheers,

 

Jeremy



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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community