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.

File Locations and Command Line

Started by samdavo, July 18, 2013, 03:02:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Sorry gents, sure this has come up spread through other posts/threads but ...

Where do people like to set their file locations?  (and what do some of them mean?)
The one I'm most unsure about is "Executables".

I was gonna say Tower of London - but it wouldn't accept that :)

And it's important that the command line pick up my macros...  which it seems to do, presumably because I set "macros location" correctly ??   So I assume command line picks up the "ini" file as well as the macros directory? 

Anyway Mine seems to work ok, but I'm not sure why lol.

Also, I personally set symbols which I create myself in same location/directory as drawings,  but then I leave Symbol Library where DACAD installs it.  (2 cents or 2p as applicable)

prl

Quote from: samdavo on July 18, 2013, 03:02:56 PM
Where do people like to set their file locations?  (and what do some of them mean?)
The one I'm most unsure about is "Executables".

Sam, my response is without looking things up in the references and so I may have things in the incorrect order.  But it goes something like this,

When you hit the command line (spacebar) and type a command,

1.  DesignCAD looks for the native command (DcMaxCmd.ini).  The native command names are matched to several alias names for the command name using Macrocmd.ini, CmdList.ini, and Custom.ini.

2.  Lastly DesignCAD looks for a command name alias (custom.ini)

3.  DesignCAD looks for a *.exe of that name.  (It will use the exectuables file path you have set)

4.  DesignCAD looks for a *.d3m or *.bsc of that name.  (It will use the macros file path you have set)


Executables are files that end in *.exe.  They can be launched from within DesignCAD (from the command line) or called within DesignCAD basicCAD programs.  I tend to call DesignCAD OLE programs (exectuables) from within basicCAD programs.

Example:

When using version 17, I regularly sweep away the type 34 entity.  The last line in this program is an executable (DesignCAD OLE) program that sends a message to my OLE DesignCAD layer manager to refresh itself.  DesignCAD will look for the SendUpdateMsg.exe in the DesignCAD executable file directory.  In my particular case, this will be D:\DcOle17.   DesignCAD OLE executables often require separate compiling for each DesignCAD version depending on changes to the DesignCAD Type library.

'K34.d3m
' Finds entities of type 34 and deletes them

Sys(80) = 0
For i = sys(9) to 1 Step -1
  Entity i
  if Sys(90) = 34 Then
    PutAttr i, 34, 1
    count = count + 1
  End If
Next i

If count > 0 Then
  >Erase
  {
  }
End If

sys(1) = 0
Message count, "Group entities found and deleted."
run "SendUpdateMsg.exe"
End



If someone reading this sees necessary corrections, please add.

DrollTroll

prl has pretty much nailed it.

However: prl, to the best of my knowledge, removing Type 34 entities from version 17 is not going to help you much -- they'll keep coming back. Version 17 always uses nested groups, so (unless I'm mistaken -- it happens) every time you reload a drawing with groups in v17, DesignCAD will recreate type 34s as necessary to "hold" the groups. Version 18 was the first one to offer the option of using nested groups or not (since they first appeared in, what, version 15 or so?)
25 years with DesignCAD

prl

#3
Quote from: DrollTroll on July 19, 2013, 08:43:26 AM
removing Type 34 entities from version 17 is not going to help you much -- they'll keep coming back.

Off topic here, but yes and no.  It took me a bit to realize versions 18 and up treated type 34 entities differently even if they (type 34s) are active in the later versions.

In version 17, if you sweep away type 34s they stay deleted.  Create a new group and of course you have one new type 34 entity in addition to the normal group index number but that is understood.

In version 18 and up, if you sweep them away and select any group and hit the infobox, ALL the type 34s are recreated even for the non-selected groups items.   The type 34s are like vampires, you can kill them but they will rise from the dead the next time you use the infobox. 

My current approach with version 22 when using groups is not to kill them but to sweep them all to layer 0 at regular intervals . . . and that layer is always ON .  There was something about the "don't use nested groups" toggle that was causing me trouble,   so I caved in and went with the flow though adding my layer 0 trick.

samdavo

Thanks prl and DT,
Clearly you've both forgotten more than I'll ever know.
Just out of curiosity what's an entity 34?
something to do with Layer 0?

prl

#5
Quote from: samdavo on July 19, 2013, 11:17:29 PM
Just out of curiosity what's an entity 34?

Nothing to do with layer 0.  It is a DesignCAD entity used to store nested group information.  It is a very deep topic, one where IMSI deviated from the original concept of a layerless group and implemented a "block" type (layer bound) group solution.

The beginning of this topic is here http://forum.designcad.com/index.php?topic=788.  There are many many discussions since.

samdavo

so prl ...
Off thread but,   would you recommend against groups nested within groups ?

prl

Quote from: samdavo on July 24, 2013, 02:45:18 AM
Off thread but,   would you recommend against groups nested within groups ?

Feel free to use nested groups as long as you fully understand the concept of nested groups and how they are implemented in DC.  Create a nested group and the "group" container entity (type 34) is held on the current layer when creating the "group".  This layer may or may not relate to anything within the "group".  The user controls this decision. 

Since I don't want to remember or care what layer I'm on when I create a group,  I only use single level (no nesting) groups.

samdavo

Thanks again.
Yes, I 'm confident I can get by with an un-nested set of groupies as well.
I mean, Nested Groupies belong in the 60's surely :)
cheers m8
sam

Dr PR

Sam,

This has been said many times now, but the problem with nested groups as DesignCAD implements them is that the "package" that contains the multiple groups (object type 34) may be on a different layer from any of the drawing elements in the groups. It is placed in whatever layer was current when the nested group was created, even if no part of the nested group is in that layer.

If the layer containing the invisible package is locked the groups cannot be selected. When this happens you are screwed.

You have no way to determine what layer the package is on. It is invisible, cannot be selected, and a layer containing nothing but the package will be marked empty in the layers list.

Furthermore, in older versions (and maybe in the latest versions) the actual drawing elements of the groups may be moved a great distance from the invisible handle. I do not know what causes this to happen, but I have seen it several times. When this happens and you zoom to fit window everything may disappear - actually the view just zooms way out so your entire drawing appear as a speck at one side of the window. But suddenly it looks like your entire drawing disappeared. This can be annoying and very confusing.

Consequently, you have to unlock all layers (UNLOCK ALL), select the nested group and explode it to get rid of the hidden package.

If you want to use nested groups you MUST always pay attention to what layer is active before you create the nested group. If you swith to any layer that actually contains a drawing element of any of the groups to be nested the hidden package will be created on a layer that actually contains some element of the nested group. This eliminates all of the problems mentioned above.

Every other program I have used that implements nested groups places the package in a layer that contains elements of the nested group. This is the only way to implement nested groups that makes any sense.

I have made a feature request for DesignCAD to work this way. I was one of the folks who requested nested groups in the first place (in the 90s) - I requested them for years, only to be greatly disappointed at the lame way they were implemented. I have been requesting the fix for years.

I started lookng into writing a macro that would automatically move the package to a layer containing elements of the nested group, but I haven't had time to pursue this. It appears to be pretty simple and I can see no reason why it wouldn't work. Maybe someday I will have time to work on it some more.

Phil
DesignCAD user since 1987

prl

Quote from: Dr PR on August 11, 2013, 12:33:01 PM
I started lookng into writing a macro . . . It appears to be pretty simple and I can see no reason why it wouldn't work.    Maybe someday . . .

Hi Phil.

Here is a start to the macro you are thinking about.  Not sure if it is bullet proof.  Basically you need to run the macro occasionally to sweep the type 34s to one of the layers of the group items.


Program: pgs.d3m (phil's grouping suggestion)

'8/11/2013

'move all entity type 34 to a layer contained within the grouped entities
for j = 1 to sys(9) 
  getattr j, type, select, laynum, groupid, red, green, blue, solidid
  if type = 34 then
      getattr j-1, typejm1, selectjm1, laynumjm1
      if laynumjm1 <> laynum then
         putattr j, type, select, laynumjm1, groupid, red, green, blue, solidid
      endif
  endif
next j

End



Dr PR

#11
prl,

Many thanks! When I get caught up with everything else I will work with this and give it a good wringing out.

Phil

PS: I just had a ruptured appendix that sent me to the emergency room and a few days in the hospital. All in all I was flat on my back for three weeks. Now I am trying to catch up at work, at home and on the Forum. It will take a while. The worst of it was we had beautiful weather just perfect for hiking and backpacking. It isn't fair to have cabin fever in the summer!
DesignCAD user since 1987

prl

Quote from: Dr PR on August 11, 2013, 02:48:39 PM
I just had a ruptured appendix that sent me to the emergency room and a few days in the hospital.

I thought you were perhaps on a sailboat enjoying the summer.   I'm glad you're OK and getting back to things. 

Dempsey

Sorry to hear that Phil.

Glad that your have recovered and are back to share you vast DC knowledge again on the forum.  :)
Dempsey

magic

Hi Phil,

Glad you're back. Ruptured appendix and three weeks on your back, that's a nasty way to spend your summer.
It's a kind of magic!