Author Topic: Lisp modification for VSCURRENT  (Read 1687 times)

0 Members and 1 Guest are viewing this topic.

ScottBolton

  • Guest
Lisp modification for VSCURRENT
« on: May 14, 2013, 09:23:53 AM »
Chaps,

I need to set VSCURRENT to 2dwireframe. Is this stored somewhere as a variable or do I have to use (command "_vscurrent"...?

S

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: Lisp modification for VSCURRENT
« Reply #1 on: May 14, 2013, 09:32:06 AM »

ScottBolton

  • Guest
Re: Lisp modification for VSCURRENT
« Reply #2 on: May 14, 2013, 04:22:57 PM »
Thanks, Lee.

Using your code I get the VisualStyle setting but I can't find a way of changing it. A simple (subst and (entmod doesn't work and there's nothing usable in the obj properties.

S

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: Lisp modification for VSCURRENT
« Reply #3 on: May 14, 2013, 05:20:39 PM »
Sorry, I had overlooked the fact that entmod cannot be used to modify a viewport entity:

Quote from: Visual LISP IDE Documentation on entmod
There are restrictions on the changes the entmod function can make:
  • An entity's type and handle cannot be changed. If you want to do this, use entdel to delete the entity, and then make a new entity with the command or entmake function.
  • The entmod function cannot change internal fields, such as the entity name in the -2 group of a seqend entity. Attempts to change such fields are ignored.
  • You cannot use the entmod function to modify a viewport entity.

And since this property does not appear to be exposed through ActiveX, I see no other way to alter it other than using the command.  :-(

ScottBolton

  • Guest
Re: Lisp modification for VSCURRENT
« Reply #4 on: May 15, 2013, 09:25:46 AM »
Ach well, I'll just have to stick with (command. I'll be able to use your code as a check prior to (command so thanks for that.

S