News:

Please note new Forum URL: forum.designcad.com

Main Menu

A menu-driven dimensioning tool

Started by bdeck, June 29, 2025, 11:48:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bdeck

NOTE:   See Post 6 in this thread for an updated version of this macro.

ddd.d3m         Version 16   BDeck      20 June 2025       

This Ten-Key-Menu-Driven improvement of "NewDim02" Draws any linear dimension without the bugs that have plagued all DC linear dimensions since version 18.

This macro eliminates in real time the dim-point-4 bug that has been documented here for over 6 years, allowing user to draw asymmetrical dimensions in any direction and have them render properly and export correctly without modification.

The ten-key menu has a new "User" selection, allowing the user to set an arbitrary "User" axis for any linear dimension by setting just 2 points.
(Thus avoiding the need to rotate the view or create and manage a special working plane)

Avoiding the native Dcad progressive dimension tool allows progressive dims to be drawn in any direction without need for bug removal.

Allows user to tweak results in "post-processing" before finalizing the dimension.

Instructions

Run macro, use ten-key pad to select dimension style/axis.

Then follow directions in the status bar.

Use final "tweak" pop-up to modify results before ending the macro.

Edit User Constants to match your own preferences.

See attached macro ddd.d3m and drawing example.dddtest01.dcd

Please post any issues here.

Edited 6/29/25 to improve layout of  main menu

Rob S

User since forever

bdeck

Found a couple of minor bugs in the tweak routines and in  baseline routines. Will work on  fix this weekend.

bd

Rob S

All this works pretty good for me using V2025.   All I can find so far is a couple of minor tweaks to possibly improve.

1)  It might be nice to have the option to draw baseline text parallel to the dimension line as the DCAD default does it?   It could be a post option, maybe?

2)  For the other post-processing options to change text or arrow size, it would be handy if the current size was displayed, or entered as default.

Amazing what you have done here.
User since forever

bdeck

#4
Quote from: Rob S on July 05, 2025, 08:27:26 AM
1)  It might be nice to have the option to draw baseline text parallel to the dimension line as the DCAD default does it?   It could be a post option, maybe?

Hi Rob,

Oops, I apparently disabled the cleanup function from the published version. See PS below on how to fix it.

Drawing a baseline dimension from the DDD menu should default to text parallel to dim line near second extension line, unless the user as changed the default settings of the DDD macro.

Whereas the macro draws progressive dims as a special subset of baseline dims, if the cleanup is not implemented in the macro, then any baseline dim drawn later from the Dcad menu may start with the last settings used by the macro for progressive dims. 

New version in progress will not  be in DIY form.

Quote
2)  For the other post-processing options to change text or arrow size, it would be handy if the current size was displayed, or entered as default.

Good idea. Will look into making it interactive.

BD

PS: Your version of DDD.d3m has a deactivated cleanup function in it.
To activate it add "gosub RestoreProgress" as the last line in the "Progress:" subroutine.
Then, in the final "RestoreProgress" subroutine,  just before the Baseline function, remove the unwanted "return".

bdeck

#5
This version 3.00 of the DDD macro executes much faster than prior versions, primarily because it regenerates only the part of the view that has changed. Extra speed will be noticed when adding dimensions to densely populated drawings. With any luck, Imsi will someday offer that as a standard command.

This version adds or improves the  following features:

* Reduces footprint of Tweak menu with more entries.
* Allows exit to infobox.
* Uses local rectangular regen to speed up all redraws, especially changing length of Extension Lines.
* Allows Aerial Zoom from any menu.
* Adds Tolerance option to Tweak menu.

* Adds an automated check to detect/correct any (previously existing) dims with
   export bugs due to Movement, Pt_4, or Type 79 export defects. Check can be triggered manually by
   pressing the X key ("Prepare for Export") from any menu, or automatically on
   exit by removing the comment hyphen before "gosub scan" on line 123.

As always, please notify me of any problems.

BD

Rob S

Hi, bdeck

Lots of work went into this, I can see.  You should apply for job at IMSI and fix the whole thing!!!

Meanwhile one small issue for me is when I use the up and down arrow in the tweaking mode, the dialog disappears, and no other tweaking is possible??
User since forever

bdeck

#7
NOTE:   See Post 6 in this thread for  most recent version of this macro.

Quote from: Rob Swhen I use the up and down arrow in the tweaking mode, the dialog disappears, and no other tweaking is possible??

Hi Rob,

After hitting the updn key, the message in the status bar should change to "Hit any unused key to restore Tweak Menu"

I normally hit a numeric key from the 10-key pad (eg: 5), as those are all close to my right hand.

However, any key stroke (except "updn" and "i") from the Tweak menu will also restore the menu, but only after execution of the command associated with that key. Disabling that execution would be  a simple task. Let me know if you think I should. 

The "updn" key disables automatic redraw of the Tweak menu to allow for multiple  key-presses without slowing down for a menu redraw. The extra speed provided by rapid redraw during response to "updn" also allows  setting user constant "dhaf"  (dimension height adjustment factor) for finer adjustment, without causing excessive delays.

As BasicCad does not have a timer or keyboard messaging, and I am unwilling to drag out my old Borland compiler, no change is likely until  Imsi adds a timer function that can send a user-defined keycode to anykey. 

Many Thanks,
bd

PS: On my system, I rename this macro "DD.d3m" , as it replaces my prior macro of that name, and that third keystroke is soooo oppressive...  :)

PPS: While pressing the down key to reduce extension line height of baseline dimensions, it is wise to avoid any extension lines having negative height.                                                                                                                                                                         


Rob S

Aha.  Thanks.

Always read status line before complaining.  :)
User since forever