CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 6958

CAD tip CAD tip # 897:

   
Question CAD 
 %  platform  category 
Q - question

How to set rendering options from LISP?

A - answer You can use the RPREF "ROPT" LISP function:

(c:rpref "ropt" STYPE ALIAS RSRVD TSAMP MINB MAXB 
 TOSSBACK BACKNORM RAYDEPTH)

STYPE=  "ascan" or "aray" 
ALIAS=  1   NHNV
        2   AHNV
        3   AHSV  (2x2)
        4   AHSV3 (3x3)
        5   AHSV4 (4x4)
RSRVD=  0   !MUST be zero
TSAMP=  1   Point
        2   Linear
        3   Mip map
MINB=   real    !Shadow map min bias
MAXB=   real    !Shadow map max bias
TOSSBACK= 0 FALSE  !Off
          1 TRUE   !On
BACKNORM= 0 FALSE  !Off
          1 TRUE   !On
RAYDEPTH= int   !Number of bounces a ray can take

BUGS:
You must turn off the Render Information Dialog while using this API.

Bringing up the Rendering Information or
Rendering Preferences dialogresets these values
to their database values if a rPlus renderer is
the current renderer.

Calling the API will set all values except
RAYDEPTH which is set only if STYPE == "ARAY".

EXAMPLES:

   (c:rpref "TOGGLE" "SKIPRDLG" "OFF")        !Turn off Rend Info Dlg
   (c:rpref "ROPT" "ARAY" 2 0 2 2.0 4.0 0 1 3)  !Defaults, raydepth set
   (c:rpref "ROPT" "ASCAN" 2 0 2 2.0 4.0 0 1 3) !Defaults, raydepth not set
   (c:rpref "ROPT" "ASCAN" 2 NIL 2 NIL NIL 0 1 3) !Shows values skipped
   (c:rpref "ROPT" "ARAY" 2 NIL 2)              !Shows values skipped & quick end


[automation scripting]
ACAD
100% *  CAD 
11.1.2001    7949×  
Prices - CAD eShop:
applies to: AutoCAD ·


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist