Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I rename a worksurface?

1 REPLY 1
Reply
Message 1 of 2
Anonymous
236 Views, 1 Reply

How do I rename a worksurface?

There's no worksurface.name

 

The only thing I can find is worksurface.surfacebodies.item(1).name and I get a declaration error if I try to alter that. 

 

How do I change the name of a worksurface from srf4 to JoeBob?

Tags (2)
1 REPLY 1
Message 2 of 2
ekinsb
in reply to: Anonymous

What you're trying to do is correct.  Whatever problem you're seeing must be because of a coding error, not because the API doesn't support it.  I just tested it with the code below where workSurf is a variable declared as WorkSurface and has a reference to an existing work surface.

 

workSurf.SurfaceBodies.Item(1).name = "JoeBob"

 After running the program, this is what I see in the browser.

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog

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

Post to forums  

Autodesk Design & Make Report