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.

number of entities

Started by bobarthur, July 23, 2007, 10:29:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bobarthur

Is there a way that I can find the number of entities that I have selected.  I am using 2000LT anf 16.2.

support

IF you open the info box it will tell you that you have "multiple" items selected but there is not a way that I know of to tell exactly how many items are with in a given mass selection.

edgar

Hi bobarthur!

I was going to offer this simple macro:

'NumSelected.d3m

'use to display the mumber of entities selected
'23 July 2007 by Ed Musgrove

firstLine$ = sys(80)
message firstLine$

end


seems easy and reasonable, but, unfortuantely DCad seems to think that a single 3D box is 3 entities! Let's see if anyone else chimes in.
-Ed

bobarthur

Thanx for the macro.  Now I have to finally learn how to run a macro.  I have made several attempts but I have not found a good tutorial!

edgar

Hi!

Quotebobarthur said:
I have to finally learn how to run a macro

Running a macro is easy (writing one might be another story  :) ).  Let us say you want to run the previously listed macro (though I will reiterate, it will not work as posted), here are the steps:

1: drag select the text in the gray box; press <CTRL><c> to copy the text to the clipboard.
2: open MS Notepad (comes with MS Windows) or your preferred text editor and paste the clipboard contents.
3: figure out where your DCad macros are stored; open DCad, open the Options/File Locations dialog;  about halfway down is the location for Macros.
4: in your text editor save the text as NumSelected.d3m (use most any name, followed by the .d3m extension)
5: select something in your DCad drawing
6: to run the macro, use the menu command Tools/Macro Execute which has a default shortcut key of % (the percent sign--a shifted 5--<SHIFT>+<5>).
7: this brings up a file requester which should open in your Macro folder--select the file you just saved and click Open. The macro will run.

When you find the large number of tremendously useful macros which come with DCad or are available online, you will want to assign those especially frequently used to keyboard shortcuts. I have explained that procedure elsewhere on this or the old forum--search for keyboard and I'm sure you will find those directions.
-Ed

bobarthur

Edgar
I got the macro to run!  Thanx!
Bob

Bob P

You can also run a macro from the command line, which can be brought up with the spacebar.  I usually name my macros with as short a (recognizable) name as possible.  You don't have to type the d3m extension either.  With a little magic, you can add values on the same line that will be passed on to the macro too.

edgar

Quote from: Bob P on July 24, 2007, 10:24:13 AM
You can also run a macro from the command line

One of the really nice features about DCad--there are often more than one way to accomplish a task!

Quote from: bobarthur on July 24, 2007, 07:29:23 AM
I got the macro to run!

Good job! Now we have to figure out a reasonable method of making the macro actually give an accurate count!
-Ed

Lar

Edgar, you macro works ok. A 3d box is actually a Solid, not an Entity. A proper Solid is a collection of surfaces making up a closed 3d shape. A 3d box consists of 2 Plane entities and 1 Grid Surface Entity (actually a Grid "Entity" consists of a Grid Header and a set of Grid Lines, but that's another story). I say "proper Solid" because you can define any collections of entities, maybe even a single one, as a Solid, but it may not be able to do what a solid is expected to do (its volume can be calculated, for example). Even if you define only surfaces as a Solid it may not be proper because the resultant shape may not be fully closed. Dcad doesn't bother to distinguish.

bobarthur, I'm not sure about 2000LT, but most versions of dcad will report the number of entities right in the Info Box. If there's a button near the top in the Info Box with a red and blue arrow cycling each other, click that and the contents of the Info Box will change to show info on the first entity in the selection set. Near the top there's a list box with the number of entities besides it. Click the down arrow to pick any of the entities individually. The selected entity will appear green on the screen.

Lar

bobarthur

Lar
No luck with 2000LT but 16.2 has the option.  I left another question about avatars and I notice that your avatar is visible.  My avatar, and many others are not vivsible on my computer.