Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: How to Detect Visual Style

  1. #1
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default How to Detect Visual Style

    For example, if the visual style is wireframe in the current drawing.
    How to detect it by autolisp?
    Your helps are much appreciated.

  2. #2
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    The reason which I rose was that I cannot see any system variables to do the job.
    I'd like to know if there is any solution for this.

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,197
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    I have not been able to find any system variables either. Is there a way to list environmental variables? perhaps it is one of those (similar to tool palette paths)

  4. #4
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    Quote Originally Posted by ccowgill View Post
    I have not been able to find any system variables either. Is there a way to list environmental variables? perhaps it is one of those (similar to tool palette paths)
    I did a search but could not find the EV list.
    Thanks.
    Perhaps we need a new system variable next version.

  5. #5
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    Same problem i had when i was looking for the last distance used in offset command
    anyhoo...

    by extracting several system variables for every Standard Visual Style (out of the box)

    I'll select "Conceptual" as the current visual style
    and i'll run this
    Code:
    (foreach var  '(
    		"VSEDGECOLOR"	
    		 "VSEDGES"	       "VSEDGESMOOTH"
    		 "VSFACESTYLE"	       "VSMATERIALMODE"
    		 "VSOBSCUREDEDGES"     "VSOBSCUREDLTYPE"
    		 "VSSILHEDGES"	       "VSSILHWIDTH")
      (print var)
      (print (getvar var))(princ))
    you will note the difference between each Vstyle and i guess you can make a matrix which condtion
    is unique to the current visual style and from there derive a basis

    give it a try.. i'm not sure though. its a shot in the dark

  6. #6
    I could stop if I wanted to
    Join Date
    2001-07
    Posts
    318
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    To find a variable you could try
    (at the acad prompt)
    lsp
    if you already haven't try it..

  7. #7
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    Thanks to pbejse & clovis.
    But what I want is to find something can return a value of the visual style, just is similar to osmode.
    So preferring a (getvar "XXX") could do the job.

  8. #8
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    Quote Originally Posted by BoKirra View Post
    Thanks to pbejse & clovis.
    But what I want is to find something can return a value of the visual style, just is similar to osmode.
    So preferring a (getvar "XXX") could do the job.
    Define "value" in this context? Unlike osnaps with their individual on/off settings visual styles have a boatload of settings with their own accepted values.

  9. #9
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    Quote Originally Posted by BoKirra View Post
    For example, if the visual style is wireframe in the current drawing.
    How to detect it by autolisp?
    Your helps are much appreciated.
    Perhaps, like this
    Code:
     
    ((lambda ()
       (vl-load-com)
    (vl-catch-all-error-message
      (vl-catch-all-apply '(lambda()
       (setq vp (vla-get-activeviewport
        (vla-get-activedocument (vlax-get-acad-object)))
      vp (vlax-vla-object->ename vp)
      elist (entget vp)
      vs (cdr (assoc 348 elist))
      vlist (entget vs)
      vstyle (cdr (assoc 2 vlist)))
       (alert vstyle))))))

  10. #10
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default Re: How to Detect Visual Style

    Quote Originally Posted by fixo View Post
    Perhaps, like this
    Code:
     
    ((lambda ()
       (vl-load-com)
    (vl-catch-all-error-message
      (vl-catch-all-apply '(lambda()
       (setq vp (vla-get-activeviewport
        (vla-get-activedocument (vlax-get-acad-object)))
      vp (vlax-vla-object->ename vp)
      elist (entget vp)
      vs (cdr (assoc 348 elist))
      vlist (entget vs)
      vstyle (cdr (assoc 2 vlist)))
       (alert vstyle))))))
    Thanks for your help.
    I tried but it returns the message:
    #<SUBR @000000002f428200 -lambda->

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. 2014: Visual Style As Seen vs How it prints
    By boyerd492098 in forum AutoCAD 3D (2007 and above)
    Replies: 3
    Last Post: 2015-05-13, 10:59 PM
  2. 2011: Visual Style Overrides Plot Style
    By CADMariner in forum AMEP General
    Replies: 1
    Last Post: 2011-06-16, 02:03 PM
  3. Visual Style Dilema
    By rod.abbott in forum AutoCAD Customization
    Replies: 4
    Last Post: 2009-09-01, 09:39 AM
  4. Visual Style issue
    By Gary.182361 in forum AutoCAD 3D (2007 and above)
    Replies: 3
    Last Post: 2008-08-29, 06:44 PM
  5. 3D Visual Style .DWG Corruption
    By fhoffnar in forum AutoCAD 3D (2007 and above)
    Replies: 5
    Last Post: 2007-08-11, 01:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •