Author Topic: LAYFRZ PROBLEM  (Read 1108 times)

0 Members and 1 Guest are viewing this topic.

pbelon

  • Mosquito
  • Posts: 7
LAYFRZ PROBLEM
« on: June 02, 2020, 04:55:20 AM »
The values of the LAYFRZ commands are stored in the register. What I do is read the actual option, then change the value of the register to what i want. After that, I restore the value it had before.

The value are stored (autocad 2017) in  "HKEY_CURRENT_USER\\\Software\\Autodesk\\<CurProd>\\<CurVer>\\<CurVer>\\Profiles\\<user profile>\\Dialogs\\LayerTools". In this program I only use the "FRZ_BlockNesting" variable

What the lisp do is saving the actual selection of the LAYFRZ command. After you select what you want, restore the last option.

The problem is that it works the first time you select and element. After that, restore the last option. Can anybody help me or explain me why it happens.

For example:

Actual option in LAYFRZ command: BLOCK - BLOCK. If I run "INUN", it change the option to BLOCK - NONE. The problem is that it restore the last option before finishing the command.

żAny help?

Thanks.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: LAYFRZ PROBLEM
« Reply #1 on: June 02, 2020, 06:54:20 AM »
The command function always returns nil.

Instead of:
Code - Auto/Visual Lisp: [Select]
  1.   (WHILE (command "_.LAYFRZ" "\\"))
Use:
Code - Auto/Visual Lisp: [Select]
  1.   (command "_.layfrz")
  2.   (while (/= 0 (getvar 'cmdactive))
  3.     (command "\\")
  4.   )

pbelon

  • Mosquito
  • Posts: 7
Re: LAYFRZ PROBLEM
« Reply #2 on: June 02, 2020, 11:25:10 AM »
Thanks Roy.

It works great!!