DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Need macro for reinventing the wheel

Started by Frederick, February 20, 2007, 05:42:25 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Frederick

Actually I'm trying to avoid reinventing the wheel since I'm sure lots of people have a macro that puts the selected entity on a different layer. All I need to do is move the selected object onto the current layer + 1. Lar, you mentioned you had such a macro, as probably everyone else does but me. Care to share?


Thanks,
Rick


prl

Well here is one version.

Quote'Program m2.d3m (move to)

include "dcadalias.d3i"

layy$=sys$(0)

if layy$ = "" then input "Enter layer number: ", layy$
dest = val(layy$)

maxsel = sys(80)

for j = 1 to maxsel
  getselect j, ent
  entity ent
  change Ent_Layer, dest
next j
sys(80)=0
sys(1)=0
regen
END

Frederick

prl, you da man. I don't know what that means but I'm pretty sure it's good.

R

jbones39

Actually, in at least Ver 13 up, you could select the entity, press Ctrl+i (to bring up the info box) and change the layer (in the drop down box) to where you wish the entity is to be placed.
John

Bob P

If you want to get fancy, download my suite of layer utilities.  Within it is a command line "L" macro which can be followed by a layer number.  It will change  the layer (and color) of the selected entity.