Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inspecting appearanceProperties causes F360 to crash

4 REPLIES 4
Reply
Message 1 of 5
pludikar
261 Views, 4 Replies

Inspecting appearanceProperties causes F360 to crash

Hi,

 

  1. create a body and apply an appearance (eg. wood|solid(solid)|3D cherry)
  2. choose a script from Scripts and Add-Ins (doesn't matter which one, as long as it works!)
  3. Activate debug
  4. In VSCode - Add a breakpoint early in a script 
  5. Run|debug
  6. Then in the VSC command Line put the following (if it isn't already in the script):
app = adsk.core.Application.get()
design = app.activeProduct
rootComp = design.rootComponent
body = rootComp.bRepBodies.item(0)

body.appearance.appearanceProperties
rot = body.appearance.appearanceProperties.itemByName('Rotation')
rot.value

 

In the debug run display, then try to inspect variable "rot"

pludikar_0-1600557873283.png

 

On my machine F360 crashes without error messages or warnings within a second or two.  It appears that everything works as long as VSC doesn't attempt to access/inspect the variable.

 

Peter

 

I'm not an expert, but I know enough to be very, very dangerous.

Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).
4 REPLIES 4
Message 2 of 5
chris.midgley
in reply to: pludikar

I am having a similar problem with the CAM object.  I having issues attaching screen casts (that's why I have not posted it yet, as posting new is really broken, but hoping reply works better).  Attached model as well.

 

Short version: Once you cast to the CAM object, any attempt to inspect (watch or hover) crashes Fusion.

Message 3 of 5

Screen cast didn't attach.  Here is the link to it.  Screencast showing CAM object inspection crashing Fusion 

 

 

Message 4 of 5
pludikar
in reply to: chris.midgley

@chris.midgley 

At least you get an error report.  I get nothing - just kills F360 dead.

 

I was getting the same issue even before the update a day or two ago. 

 

The last F360 update was actually quite painful, particularly in conjunction with Windows update that happened at the same time.  You always know when Windows is about to update, because things start to break

 

 

I'm not an expert, but I know enough to be very, very dangerous.

Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).
Message 5 of 5
BrianEkins
in reply to: pludikar

Both of these are bugs in the API that need to be addressed.  I don't believe they have anything to do with VS Code except that when debugging with VS Code it's making a lot of API calls to be able to show the values of properties on the object your viewing.  In the case of the hard crash with the appearance it's crashing when the values property of the FloatProperty object is called.

 

For the CAM problem, I'm not able to narrow it down to a specific property but suspect it's a similar problem.  Bugs have been created for both problems.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report