Kubotek Forum

KeyCreator CAD & CKD Viewer Technical discussion of CAD/CAM and integrated partner products
Customer Forum > KeyCreator CAD & CKD Viewer > bursting via kxl View modes: 
User avatar
Advanced member
Advanced member
Dana - 9/17/2020 11:58:24 AM
   
bursting via kxl
I'm working with a KXL that uses GETENTM to select entities, GetSelected to retrieve the handles, and then edits the entity properties.  If the entity is a DP fastener, it retrieves the fastener information using GetFastenerData, then it bursts the fastener(s).  The problem is that once it's burst, the handle and entity ID changes, so I can no longer access that entity, and if I set the properties before bursting it, they're lost once it's burst.

Is there any way to burst a fastener entity and keep track of the newly created solid?

There used to be a system variable @lastid which was the ID of the most recently created entity, but that seems to no longer exist.

User avatar
Advanced member
Advanced member
Hans_Winkler - 9/17/2020 2:11:52 PM
   
RE:bursting via kxl
Dana,
look at the function:
LastEnt
    LastEnt hEntity hEnt
    Gets a handle to the last selected or created entity
    Parameters
    hEnt
    variable to put the handle into


That is the function that replaced the system variable @lastid, as far as I remember.
I have not used it in conjuction with the Burst function, you have to try it. It does not work in all situations!

Should this not work, the only work around that I know is:
Move the entity to an empty level, burst the entity, use the GetEntitiesFromLevel function to retrieve the entity, thus you have the handle again, then move it back to the original level where it came from, all on the fly. It's a pain, but it works.

Hans
 

User avatar
Advanced member
Advanced member
Hans_Winkler - 9/17/2020 2:47:05 PM
   
RE:bursting via kxl
Dana,
I don't know how to get a hold of you, so if you'd like code for the second option, contact me via my website:
jennica_mold_design dot com (minus the underscores)

Hans

User avatar
Advanced member
Advanced member
Dana - 9/17/2020 3:40:46 PM
   
RE:bursting via kxl
Doesn't seem to work.  I have:

BURST hsel
LastEnt hburst

SetEntityProperties hburst, $name, $$acsStandard, $$acsUser

and I get, "Handle hburst is incorrect type"

hsel is from previous selection and $name, etc. are also previously defined

User avatar
Advanced member
Advanced member
Hans_Winkler - 9/17/2020 5:21:04 PM
   
RE:bursting via kxl
Dana,
contact me, I have the solution for you.
Hans

1
Login