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.

How do I use "Custom Distance" in a macro?

Started by Lar, July 16, 2011, 09:56:54 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Lar

Hi all,

I'm trying to use "Custom Distance..." from the j-menu (start a drawing command, set a point then press the J key... a context menu will pop-up) in a macro but I can't find anything (I looked in parameters in the help file, macrocomand.ini for a "ID_something", sys commands, even a keyboard shortcut but no luck).

I want to be able to activate the command, disable "release fixed distance on point set" then enable it at the end of the macro.

Lar

JJG

Hi Lar,

I think it is not programmable in macro language, or at least, like you, I never found out how to do.

But however, I use it from time to time during the execution of a macro :
for example, in a sort of macro command like :

>Line
{
<MaxPoints 3
<Pointxyz 0, 0, 0
<Incomplete
}

the macro places the first point (here 0,0,0) , and waits for the user places the other necessary points,
and for that, you can then press the keyboard shortcut "J", and select Custom-Distance (as manualy during Designcad-commands),
and then the macro continues to run the following planned operations.. etc ...
works fine for me.

Lar

#2
Thanks, JJG.

I just found the stuff below (at the end of this post) in cmdlist.ini and am now in the process of testing them.

So far I tried the following and got the error below it:
>ID_CURSORMOVE_DISTANCE_FIXED
{
}

Error executing DesignCAD command -
ID_CURSORMOVE_DISTANCE_FIXED ID:10623

I tried it like this and got a similar error, then another error message with the '<' before the command name and no 'ID:10623...
>Line
{
<Pointxyz 0, 0, 0
<ID_CURSORMOVE_DISTANCE_FIXED
<incomplete
}

Lar

Point Control commands found in cmdlist.ini:
Move90=ID_CURSORMOVE_V
Move0=ID_CURSORMOVE_H
Move30=ID_CURSORMOVE_30
Move45=ID_CURSORMOVE_45
Move60=ID_CURSORMOVE_60
Move120=ID_CURSORMOVE_120
Move135=ID_CURSORMOVE_135
Move150=ID_CURSORMOVE_150
IncrementAngle=ID_CURSORMOVE_ANGLE_INC
DecrementAngle=ID_CURSORMOVE_ANGLE_DEC
MovePreviousAngle=ID_CURSORMOVE_ANGLE_PREVIOUS
MoveCustomAngle=ID_CURSORMOVE_ANGLE_NEW
ReaseAngleAfterPoint=ID_FIXED_ANGLE_AUTORELEASE
MoveSameAngleAsLine=ID_CURSORMOVE_SAMEASLINE
MoveSameAngleAs2Points=ID_CURSORMOVE_SAMEASPOINTS
MoveAngleFromLine=ID_CURSORMOVE_FROMLINE
MoveAngleFrom2Points=ID_CURSORMOVE_FROMPOINTS
MoveFixedDistance=ID_CURSORMOVE_DISTANCE_FIXED
MoveCustomDistance=ID_CURSORMOVE_DISTANCE_NEW
ReleaseDistanceAfterPoint=ID_FIXED_DISTANCE_AUTORELEASE
MoveSameDistanceAs2Points=ID_CURSORMOVE_DISTANCE_SAMEASPOINTS
MoveSameAngleDistanceAs2Pts=ID_CURSORMOVE_ANGLEDISTANCE_SAMEASPOINTS

JJG

Yes, I also already tried something similar to find some "sameas" commands ... which are not listed in the cmdlist.ini file, or more generally, in the Dc3MaxCmd.ini file ... (and I find in fact something !).

But for these ones you mention, no succes.

In the way of use, in my explanations above, you can replace the "j" shurtcut by the "space bar", to run the command name : then type the "ID_CURSORMOVE_DISTANCE_FIXED", press "enter" and it will run too.

JJG

Quote from: Lar on July 20, 2011, 12:47:55 PM
I tried it like this and got a similar error, then another error message with the '<' before the command name and no 'ID:10623...
>Line
{
<Pointxyz 0, 0, 0
<ID_CURSORMOVE_DISTANCE_FIXED
<incomplete
}

Lar

For that (after a "<") , it should be the "IDM_FUN_...."  [that is to say a DesignCAD Command Parameter ID, from Dc3MaxCmd.ini file] instead of a "ID_....." [that is to say a DesignCAD Command ID],
but I do not find anything corresponding to "Custom Distance..."

IDM_FUN_DISTANCE=41055 does not ...

I tried too (unfortunately unsuccesfully) "IDM_FUN_CURSORMOVE_DISTANCE_FIXED" which is not listed in Dc3MaxCmd.ini file ...
(all the DesignCAD commands are unfortunately not necessarily written to this file ... there are some that have not been shown, that can be discovered through trial and through error message indications)

Lar

Sorry for the slow responding JJG and thanks for the help.

I figured another way to get done what I was trying and it works quite well. If I ever find the solution to 'fixed distance' I will post it here.

Lar