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.

Can Layers be <Pgm>Cycled, (to show assembly, in STEPS)

Started by boswell, April 29, 2011, 04:50:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

boswell

startng with the most BASIC, (layer 1) ... (lay 2), next assembly sequence

Bob P

Will you PLEASE post in complete sentences?  >:(
You've done it once or twice before.  I remember.

boswell


dcadRob

Are you saying that you want to hide all layers and then make them visible consecutively(perhaps pressing a key when you want the next layer)?

boswell

dcadRob;

Thank you for respondng!

That's it, exactly!  Those are the Words ... now I need it in Dcad language.

Lar

boswell, make layer 1 the current layer, turn off the rest and run the macro below. It may be best to create bitmaps of each stage and put these on consecutive layers.

Lar


for L=2 to 20  'change the 20 for the amount of frames you have (note: some dcads have 21 layers (including 0), some 256, some 1001 and some 2001)
layer(L)=14     'the layer is made current...
layer(L-1)=0    'the previous layer is turned off...

>regenerate     'this is when the layer is actually shown...
{
}

for delay=1 to 10000   'experiment with this for a good delay between frames. May not be necessary if your bitmaps load slow...
next 'delay

next 'L

dcadRob

This macro will show consecutive layers.
'show consecutive layers
'press 'Q' to end and make all layers visible
'press <escape> to stop on a layer add keep the rest hidden

last=2000
'assume maximum layers is 2000

current=sys(3)
layer(0)=14

for i=1 to last
layer(i)=0
next
regen

q$=""

for i=0 to last
status=layer(i)

if odd(status)=1 and (q$<>"q" and q$<>"Q") then
layer(i)=14
regen
name$=sys$(93)
format num$,"(%d) ",i
prompt$="Showing Layer : "+num$+name$+" - Press Any Key for Next Layer or <Q> to Quit "
print prompt$
anykey q$

else
layer(i)=6

end if

next
layer(current)=14
regen
end

boswell

I thank you both for the Macros.

dcadRob;
I could use Comment line, for each; inorder to learn from it!


Lar

boswell, another way to do this, but only by using bitmaps, is to simply load the bitmaps from 1st to last on top of each other then hit R for regen. Each bitmap will display one after another.

For user control over the delay between frames you can gravity snap to one of the corners of the set of bitmaps, which will select the 1st one and display it. When you're ready for the 2nd frame press enter for 'select next'. The 2nd image will be selected and that will be displayed. Continue pressing enter to cycle through the images.

Lar