Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Mapkey for creating drawings issue

SayWhatEh

New member
Hey there. I have a slight problem, made a mapkey to create a new drawing from the active model, then add some parameters, save the thing, change the format and add some attachment points so the user can paste tables correctly.
I have mapkeys that does one of these function, so I use the %name to call those, but the mapkey just seems to ignore it. Code follows, dwg_a3 is the mapkey that calls the others...


mapkey dwg_a3 @MAPKEY_NAMEA script for creating an A3 drawing, calls other \


mapkey(continued) mapkeys to accomplish this.;@MAPKEY_LABELCreate a A3 drawing;\


mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `File`;\


mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;~ Activate `main_dlg_cur` `File.psh_new`;\


mapkey(continued) ~ Select `new` `Type`1 `Drawing`;\


mapkey(continued) @MANUAL_PAUSE1. Skriv in ritningsnumret i "name" rutan.\n2. Forts
 
I am not sure that this will help you, but it is offen a better to use the old parameter interface when working with parameters from mapkeys. There is a config option for that. I have made a mapkey that load a config.pro file to set the old userinterface and another to load the new interface. I use the %name to load the to mapkeys . One the start and the other in end of the mapkey where i work with parameters. Nothice that when working with parameters in the new interface the mapkey record the position in the table and the the name of the parameter. That mean the if some parts have more or les parameters then the mapkey will select the wrong parameter.


Have you add the %name from a text editor for have you record it by making the mapkey. If you record it it should work.
 
jnoval, I moved the parameters to a template instead(all drawings use one and only one template), it seemed easier. But now I have fixed the problem by pasting all the code into one mapkey since the %name calls never seemed to do anything. So it works, but not the way I want it. Does anyone know why the %name calls seems to do nothing?
 
Try to test %name in a short mapkey


Try to make the name in %name short like %cf3 instead of %changeformata3. This is just a wild guess


Normaly I do not have problems with %name
 
dDross, when recording a mapkey there ain't no space between, and I get the mapkey to work, I just can't call another mapkey from a mapkey.
 

Sponsor

Back
Top