Sysvar Changed Reactor and REGEN

Sysvar Changed Reactor and REGEN

scot-65
Advisor Advisor
400 Views
5 Replies
Message 1 of 6

Sysvar Changed Reactor and REGEN

scot-65
Advisor
Advisor

R2024 LT

 

I am trying to take advantage of CENTERLAYER, DIMLAYER, HPLAYER, and TEXTLAYER as part of our workflow. When the user selects a layer to be current using the toolbar or ribbon control, I am able to

trap this CLAYER change thru the Sysvar Changed Reactor and thaw these associative layers; if frozen.

 

(setpropertyvalue (tblobjname "layer" (strcat r x)) "IsFrozen" 0)

 

The issue I am having is these associative layers will become thawed, but do not show.

(redraw) and

(redraw (tblobjname "LAYER" "MYtextlayer")) does not work.

 

Any ideas how to get these associative layers to display?

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Accepted solutions (1)
401 Views
5 Replies
Replies (5)
Message 2 of 6

paullimapa
Mentor
Mentor

How’s about a regen?

Usually a regen is required to show objects on thawed layers. Another workaround I’ve used is to try ssget filter all those objects on those layers and then do a move in place 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 6

scot-65
Advisor
Advisor

I have tried

VL-CMDF and

ENTUPD with no success.

 

@paullimapa 

The sequence is nested inside a reactor event where commands are not allowed.

:vlr-sysvarWillChange does not supply the proposed value, only the variable name itself.

 

Possibly some sort of vla-get-Layer (not Layers) method with some sort of a vla regen?

I do not want to loop thru a _rather large_ layer list.

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 4 of 6

paullimapa
Mentor
Mentor
Accepted solution

Perhaps try vla-regen if this method is allowed 

https://www.afralisp.net/archive/methods/lista/regen_method.htm


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 6

scot-65
Advisor
Advisor

Thanks,

 

This did the trick.

 

(vla-Regen (vla-get-ActiveDocument (vlax-get-acad-object)) acActiveViewport) ;-or- acAllViewports

 

Leaves command line chatter though.

"Regenerating model."

and

"Command:"

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 6 of 6

paullimapa
Mentor
Mentor

Better than not seeing anything…cheers!! 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes