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.

Blocks and Handles - How are you getting them to work?

Started by prl, December 12, 2012, 02:12:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prl

Quote from: MarkX on December 13, 2012, 06:17:14 AM
Does the symbol file need to be in the same directory as the working file, or can it be in the DC symbol library?

Your symbol file is just a normal DesignCAD drawing and you can put it anywhere.  But keep in mind, when you load a file this way (externally referenced symbol), DesignCAD stores the file path for that symbol.  This is how I was able to write a macro that in my main drawing, I select a symbol and type es (edit symbol), and the macro knows where to look.  I hate thinking too much (where did I put that symbol) so let the macro do it for me.

Obviously there is some danger in using externally referenced symbols.  If you destroy the symbol files or their locations, your main drawing is lost. It is simply a shell drawing.  It will look for things that don't exist.

Lar must be having a senior moment (or his internet is on the fritz).  He is the master of external symbols and knows the advantanges and dangers better than I.  I'm still exploring this new-to-me approach as a 3d project development system so as to deal with large projects and their ever increasing complexity.  If I can work on bits and pieces of a building separately and have a master drawing build the model for me using this approach, that would be the ultimate objective for me.

Time will tell what actually works.

Dr PR

Minstrel,

In addition to all the past problems with blocks, my main reason for not using them is that they don't provide any advantages in the things I work on, and they must increase the program's work load (slower operations) for rendering.

Consider the ship model I have been working on for about eight years - something like 800 Mbytes in dozens of files and still growing. There are very few complex parts that are repeated more than once, so there is no reason to make blocks of them. There are just a few major parts that are duplicated once.

I first tried to use a block for a stanchion used in life rails. There are lots of these on the ship, but only two or three types in all. Idealy, a stanchion block would reduce file size considerably. However, when rendered in hidden line the joint between the vertical stanchion and horizontal rails doesn't show, so I would have to draw this joint in in thousands of places in 2D drawings generated from the 3D model. So I used actual solids instead of blocks and used "Solid Add" to fuse them together to get visible junctions in drawings.

About the only things I could actually use blocks for is the heads of rivets, bolts and screws and nuts. There are many thousands of these on the ship (about 30% of some drawings is fasteners), so blocks would substantially reduce file size on the hard drive. This would speed saving and loading the files.

However, saving and loading is not the major problem. Neither is large file size (the work is stored on a 500 Gbyte drive). The real problem is the amount of RAM needed after the file is loaded. DesignCAD can address only a part of the 4 Gbytes of RAM on my machine. With the largest files I have never seen it use more than 1 Gbyte, even when an extra 2 Gbytes are not used. This has limited the largest file that I have been able to use to about 300-330 Mbytes. I assume that DesignCAD has to keep the working copy, a backup copy, program variables, shading information and shadow maps all within a 1 Gbyte address space. I have been able to open a 375 Mbyte file and work on it (add new objects), but if I try to render it the program crashes. My guess is that there just isn't enough address space left to create the shading information after the working copy and backup copy are stuffed into the 1 Gbyte address space.

Note: DT has never confirmed this limit, but I have run into it many times with files that exceed 300 Mbytes. As a consequence my model is broken into many subassemblies while I wait for the day we can work with 1 Gbyte or larger files.

So, the question is this: What effect do blocks have on the working file size in RAM, and not the file size that is saved to disk? I haven't done any experiments (working with 300 Mbyte files is slow - up to 90 minutes for the first Gouraud shading), but I have been thinking of ways to test with smaller files.

However, the program has to expand the blocks after they are read into RAM in order to be able to display the objects. Either it does this as each block is read into RAM (so there is no memory saving) or it expands each block every time the view changes ( causing even longer render times). I can live with longer render times if blocks would allow me to work with larger drawings (in the limited RAM address space).

But for now I just use real solids instead of blocks because it works predictably.

Phil

PS: A 10 Mbyte drawing opens in a few seconds on my machines. If you are waiting minutes there is something wrong somewhere.
DesignCAD user since 1987

prl

Quote from: Dr PR on December 13, 2012, 11:43:10 AM
So, the question is this: What effect do blocks have on the working file size in RAM, and not the file size that is saved to disk?

Yes I would like to know that too.  How about an experiment.  Open a new blank drawing and do an external symbol load of one of your larger equipment assemblies. Then take that symbol and make several copies of it. See how large you can go and see if there is any memory advantage.  Technically there will be only one assembly loaded into memory and everything else is an instance.

minstrel

Quote from: Dr PR on December 13, 2012, 11:43:10 AM
So, the question is this: What effect do blocks have on the working file size in RAM, and not the file size that is saved to disk?
Well Phil, just with Adrians 'Antlers' test [very basic indeed]  I can say system performance bottlenecked considerably.  Now, whether or not my system is to blame here,  I will need to test futher. 

Quote from: prl on December 13, 2012, 11:52:31 AM
Then take that symbol and make several copies of it. See how large you can go and see if there is any memory advantage. 
This is what I in essence did with the 'Antlers' test; only using block though.  I'll do my own, meger, testing and try it with symbols.   I was disappointed with the systems responsiveness with the blocks...and like Phil mentioned, my system may have issues.

aside:  you are aware that Microsoft released several updates this morning....I woke up to a disaster.  Finalizing a 'web' project for a client and suddendly all my OpenType fonts vanished from my graphics programs/and all files.  Sure enough it was an  'update' screwup and the problem update was identified...which I removed.  Fonts are back; project completed....but, I did do this 'Reindeer-Antlers-Tree' thing before the microsoft update file was uninstalled....makes me wonder?

Minstrel

Lar

Quote from: prl on December 13, 2012, 06:47:57 AM
Lar must be having a senior moment (or his internet is on the fritz). 

It's been on the fritz for a while now.

Just saw the Lar Signal, don't have time to read through all the posts, don't have time to view the video, hope I can be some help.

Firstly, I consider Blocks and symbols to be 2 different concepts, both with advantages and disadvantages, can't get into that right now. In my mind symbols are more powerful than blocks. I'm no lover of blocks but I have used them a bit lately.

When defining blocks I normally select the 'retain' option, which places an instance in memory but the original objects remains normal entities. This is in case I redefine the wrong name, then I will have the original entities to make corrections with.

Far as I know blocks only take the first handle. I would insert then set sticky handles for placement-and-rotation. Thereafter I can select any instance of the block and duplicate using the its sticky handles.

I normally export to cinema 4d, which doesn't accept blocks so I would have to explode anyway. Their blocks (called 'Instances') are dynamic so just adding to or taking entities from the parent redefines all the instances automatically. Because of this I only export the originals and then I can draw 2 point lines to emulate the position and rotation of each block and use one of their animation tricks to easily place and rotate the duplicates of the blocks. These 2 point lines are normally duplicated along with my dcad blocks so I don't have to create them when I'm ready to export. I don't really know if exporting blocks to acad works ok or not.

The main issue I have with dcad blocks is that to redefine a block across multiple files you have to open each file and redefine each block manually. With symbols all you have to do is make changes to the source file and once you save all your multiple files are updated without even opening them.

Lar


Dr PR

Or, to put it another way, when you change the symbol file (redefine the symbol) ALL instances of that symbol in ALL drawings changes. That's good if that is what you intended, but very bad if you changed an older drawing that shouldn't have been changed. So user, beware! You need to remember where you used a symbol.

Some drawing items are ideal for symbols - such as a company logo or title block. When you make minor changes to a symbol the changes propogate to all drawings that use the symbol.

Drawing items that are specific to a single drawing are probably better suited to blocks.

Phil
DesignCAD user since 1987

Lar

With symbols you have to keep backups of your symbols. That's one of the disadvantages I didn't have time to get into in my previous post. You can backup within a file by putting an instance on a dedicated layer(s) and explode it so you have something to recreate with.

Even if the source file of symbol gets messed just recreating it and giving it the same path and name instantly corrects all of your files.

You can also rename a source file, open a target drawing, dcad won't be able to find it so will ask you to locate it (if browsing is enabled in options> general tab). You can then select a completely new source file and dcad will just go with that. The downside of this is that dcad will ask to browse for each instance of that symbol with that name.

Lar

Dr PR

This was an eye-opener!

I decided to test the effects of blocks on system RAM useage and rendering time. My test file is shown in the attached picture. The basic objects were a red cube, green pyramid and blue sphere, selected together. These were arrayed in a 10x10x10 array with the original objects as the first objects in the array. Then they were shaded using Gouraud shading with hardware acceleration enabled. I used the Windows Task Manager "Performance" display to measure system RAM useage.

For reference:                                            RAM          RAM       RAM
                                                                  Used      Cached    Free
Lobotomized* Vista 64 + Task Manager    648 Mb   430 Mb    3126 Mb


Test 1. Create the three solids, select them and make the 10x10x10 array.

                                                                  RAM          RAM       RAM
                                                                  Used      Cached    Free
DesignCAD V22.1 beta 4 + blank file         743 Mb   493 Mb    2983 Mb
DesignCAD + 10x10x10 array of solids      825 Mb   508 Mb    2898 Mb
DesignCAD + Gouraud shaded array         834 Mb   507 Mb    2887 Mb
    Gouraud shading time = 10 seconds
    File size = 17,909 Kbytes

Test 2. Shut down DesignCAD and restart. Vista used a bit more RAM than the initial startup - possibly because some resources weren't freed up when DesignCAD shut down. This is why a bit more RAM was used when DesignCAD was started again.

Create the three solids, select them and define them to be a block using the "Convert to block" option. Select the block and create a 10x10x10 array of blocks.

                                                                  RAM          RAM       RAM
                                                                  Used      Cached    Free
DesignCAD V22.1 beta 4 + blank file         745 Mb   532 Mb    2952 Mb
DesignCAD + 10x10x10 array of blocks     746 Mb   532 Mb    2951 Mb
DesignCAD + Gouraud shaded array         749 Mb   533 Mb    2947 Mb
    Gouraud shading time = 1 second
    File size = 432 Kbytes

Note: I was skeptical about these results, especially the shading time. This morning I started the machine, loaded DesignCAD and repeated the test with blocks. I got essentially the same results. The shading timing was actually 1.78 seconds, give or take a few hundred milliseconds while I pushed the stop button.

Wow!

System RAM use was 95 Mbytes for the array of solids and 1 Mbyte for the array of blocks.        95:1
RAM use for shading the solids was 9 Mbytes and only 3 Mbytes for the blocks.                            3:1
Shading time for the solids was 10 seconds and only 1 second for the blocks.                             10:1
File size for the array of solids was 17,909 Kbytes and for the array of blocks was 432 Kbytes.   41:1

Note: An empty drawing is 48 Kbytes.

I think I love blocks!

Phil

* When I first installed Vista 64 it created 244 startup programs, and used 2.2 Gbytes of system RAM (out of 4 Gbytes). I then disabled all 244 startups and it used less that 650 Mbytes. To my delight all of my programs run after lobotomizing Vista - the entire Microsoft Office Suite (Word, Excel, Powerpoint, etc.), Photoshop, DesignCAD and several other programs. I eventually restarted the program that suppies system information for Task Manager.

The Vista machine has no network connections, and many of the startup programs were network services. This makes the machine secure, and it eliminates a lot of CPU cycle stealers that would be running in the background.
DesignCAD user since 1987

prl

Quote from: Dr PR on December 13, 2012, 09:36:45 PM
This was an eye-opener!
.
.
.
I think I love blocks!

Thanks, that is stunning.  I love these type of "studies".

minstrel

See, when you 'grab the Reindeer by the Antlers'... great things can happen!   Now, who's the boss!

Great test scenario...pretty too!  Did a similar test to check my system again after Adrians 'Antlers'... using my own design and things went speedily along.   

Quote from: Dr PR on December 13, 2012, 09:36:45 PM
The Vista machine has no network connections, and many of the startup programs were network services. This makes the machine secure, and it eliminates a lot of CPU cycle stealers that would be running in the background.

Is this 'Lobotomized' machine of yours used exclusively for DesignCAD?...what a luxuary.  Lots of the programs I've installed require/utilize internet connect to function properly. 

Well, let you get back to playing around with your 'building blocks'!  ...How is it you got to open this present before Christmas?

Minstrel

Dr PR

Minstrel,

When I build a new machine I transfer the old machine to trivial tasks like Internet connections for email and web browsing.

The new machine becomes my primary work machine. Without network connections it has far fewer time wasters running in the background. For instance, it has no antivirus software. All files (and program updates) going to this machine are loaded onto USB memory sticks through the machine that has antivirus software. This ensures that the files are "blessed" before they go to the work machine. I disable indexing and other useless Windows functions.

I don't have any software on the work machine that requires an internet connection. Some programs try to make connections, especially for help support, but they work OK otherwise. And even with programs like Photoshop and other Adobe software, you can find help files in PDF format. I even do all of my web page development on the machine without a network connection, and I have several browsers installed on it. They work fine for testing HTML files, even without a network connection.

Anything that needs an Internet connection runs on the older machine that is connected to the Internet.

Phil
DesignCAD user since 1987

minstrel

Thanks for the info, Phil...

...if you new system is not hooked up to the internet, how on earth to you get the OS to install and activate? 

Minstrel

JJG

Quote from: Dr PR on December 14, 2012, 11:33:19 AM
Minstrel,

When I build a new machine I transfer the old machine to trivial tasks like Internet connections for email and web browsing.

The new machine becomes my primary work machine. Without network connections it has far fewer time wasters running in the background. For instance, it has no antivirus software. All files (and program updates) going to this machine are loaded onto USB memory sticks through the machine that has antivirus software. This ensures that the files are "blessed" before they go to the work machine. I disable indexing and other useless Windows functions.

I don't have any software on the work machine that requires an internet connection. Some programs try to make connections, especially for help support, but they work OK otherwise. And even with programs like Photoshop and other Adobe software, you can find help files in PDF format. I even do all of my web page development on the machine without a network connection, and I have several browsers installed on it. They work fine for testing HTML files, even without a network connection.

Anything that needs an Internet connection runs on the older machine that is connected to the Internet.

Phil

Phil,

we are both !
;)

Dr PR

Minstrel,

I use OEM (Original Equipment Manufacturers) packages for Windows. You have (had?) an option of calling Microsoft over the telephone and keying in your code number that came with Windows and they then give you the activation code. I'm not certain, but you may also be able to do this on line.

I am always astonished that some people don't know that a computer can run without an Internet connection. ALL high security systems operate without external network connections. Obviously, you must be able to install software on them.

For example, suppose you have computer operated machinery that could kill someone. Would you be dumb enough to expose it to hackers? I don't care how much "protection" firewalls, antivirus, encrypted codes and other so called "security" software are supposed to give, any reasonably bright and motivated person can eventually hack through it. Just ask the Iranians.

On one job we did, writing stock portfolio programs for one of the largest stock trading firms in the world, our programmers had to pass through several security check points, and worked in rooms with armed guards outside the doors. There wasn't even a telephone in the room. And no one programmer was allowed to write more than a small part of the code. Needless to say, there was no network connection either.

Mobile computers, like laptops, are used where there is no Internet connection. You have to be able to install software on them.

Phil
DesignCAD user since 1987

minstrel

Quote from: Dr PR on December 14, 2012, 01:00:05 PM
I am always astonished that some people don't know that a computer can run without an Internet connection. ALL high security systems operate without external network connections. Obviously, you must be able to install software on them.

Good point and I hear what you're say, but from my standpoint, it would need to be a very specific workstation with a extremely limited selection of software, because more than half of what I got installed and use quite offen rely on net connection - not only for installation/activation but 'full feature' downloads to complete the original install plus acess to online databases.... far from a secure system, ain't it.

If only DesignCAD could simply make 'blocks' out of these software packages...hum?

Minstrel