Hi,
I am trying to set the name of a SketchBlockInstance created from aSketchBlockDefinition that is loaded from a block file usingMakeSketchBlockFromFile.
When I set the name it also changes the name of the blockdefinition and all the previous instances created from thedefinition.
Here is an example:
swBlockDef = swSketchMgr.MakeSketchBlockFromFile(newPosition,BLOCK_PATH, True, 1, 0)
vBlockInst = swBlockDef.GetInstances
swBlockInst = vBlockInst(swBlockDef.GetInstanceCount - 1)
swBlockInst.Name = INSTANCE_NAME
Is there any way to change the name of an instance with outchanging the definition name and other instances created from thatdefinition?
Any help would be greatly appreciated!
Thanks!SolidworksApi macros
I am trying to set the name of a SketchBlockInstance created from aSketchBlockDefinition that is loaded from a block file usingMakeSketchBlockFromFile.
When I set the name it also changes the name of the blockdefinition and all the previous instances created from thedefinition.
Here is an example:
swBlockDef = swSketchMgr.MakeSketchBlockFromFile(newPosition,BLOCK_PATH, True, 1, 0)
vBlockInst = swBlockDef.GetInstances
swBlockInst = vBlockInst(swBlockDef.GetInstanceCount - 1)
swBlockInst.Name = INSTANCE_NAME
Is there any way to change the name of an instance with outchanging the definition name and other instances created from thatdefinition?
Any help would be greatly appreciated!
Thanks!SolidworksApi macros