navigate  
  Home
Contact Us
Store
Library
Forums
 
     

  Forums

Forums » Customization » cadl for sorting geometry to different levels by color Messages in this topic - RSS
|
16.11.2004 13:28:22
Dennis Nenadov
Dennis Nenadov
Posts 14

Hello,


I had a macro (back in CK19) that took all of the geometry on my screen and sorted it to different levels by color. Is there a way to write a KXL/ Cadl file for Keycreator that will do the same thing? If someone would start me off with a little example, I probably will be able to finish it.


Thanks


Dennis

30.11.2004 07:24:35
Dennis Nenadov
Dennis Nenadov
Posts 14
 // Set the mask for the desired color
MASKCLEAR
MASKCOLOR 1

// Get all entities in the viewport that match the mask
CLEAR nSel
INT nSel
GETALL nSel

// If no entities were selected, exit
if (0 == nSel)
    exit

// Get a handle to the desired level, creating it if necessary
CLEAR hDestLevel
HLEVEL hDestLevel
LEVELBYSTRING "10", 1, hDestLevel, 1

// Move all entities in the selection list to this level.
DEFATTR LEVEL
SETATTR , hDestLevel

// Note a state and clear the mask
NoteState
MASKCLEAR
30.11.2004 09:07:00
Dennis Nenadov
Dennis Nenadov
Posts 14

The code above moves all entites on the screen that are color # 1 to level number 10.


 


Dennis

pages: 1
|

Forums » Customization » cadl for sorting geometry to different levels by color