Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
AutoPLANT | OpenPlant | PlantWise
  • Product Communities
  • More
AutoPLANT | OpenPlant | PlantWise
AutoPLANT | OpenPlant | PlantWise Wiki How do I turn on IAREA to Automatically Populate when a Control Valve is placed?
    • Sign in
    • -AutoPLANT | Bentley Raceway and Cable Management | OpenPlant | PlantWise Wiki
      • +OpenPlant
      • -Bentley AutoPLANT
        • AutoPLANT Product Group Compatibility
        • +AutoPLANT Modeler CONNECT Edition
        • +AutoPLANT Modeler V8i
        • +AutoPLANT Piping
        • +AutoPLANT Equipment
        • +AutoPLANT I&W
        • -AutoPLANT P&ID
          • APPID: Error 2727 - The directory entry 'ACADDIR1' does not exist in the Directory table.
          • AutoPLANT Equipment - Equipment: Setting colors
          • Certain AutoPLANT tables are not created when creating new project from current.
          • How do I change the slant of text for Piping Annotation in AutoPLANT P&ID?
          • How do I customize insulation insertion and attributes
          • How do I move a P&ID drawing to another Project?
          • How do I turn on IAREA to Automatically Populate when a Control Valve is placed?
          • How To Add New Actuators For Control Valves [TN]
          • How to configure AutoPLANT P&ID V8i SS2 for use with customized CATT dialogs [TN]
          • How To Convert PID Menu Files To AutoCADs CUI Menu System [TN]
          • How To Define Custom Layers For Custom Components [TN]
          • How to download the AutoCAD 2012 VBA Enabler for AutoPLANT P&ID Find Tag and other VBA Dialog use?
          • How to script an install for the Process and Instrumentation Workgroup?
          • Install Order For AutoPLANT PID XM Edition [TN]
          • Project database upgrade options in Project Administrator
          • ProjectDB
          • Where are AutoPLANT P&ID Assemblies stored?
        • +AutoPLANT Isometrics
        • +AutoPLANT AutoISOGEN
        • +Bentley Data Manager
        • +Vision/Document Manager
        • +Drawing Flattener
        • +DataSheets
        • +Specification Generator
        • +ProjectWise Integration
      • +Bentley Navigator
      • +Bentley PlantSpace
      • +Plant Project Tools
      • +Bentley Raceway and Cable Management
      • i-model Composition Service for S3D
      • Working from home with OpenPlant
      • Working from home with Bentley Raceway and Cable Management
      • Working from home with AutoPLANT Modeler
    • How to Associate the Specification Based on Service in OpenPlant Modeler Connect

     
     Questions about this article, topic, or product? Click here. 

    How do I turn on IAREA to Automatically Populate when a Control Valve is placed?

    How to Turn on IAREA for Control Valves Automatically and also have it appear below the Fail Mode?

    1. Close all Bentley apps.
    2. Browse to the PID-SUP.LSP file in the location below:

     Windows 32 bit OS: Location = C:\Documents and Settings\All Users\Application Data\Bentley\Plant V8i\P&ID

    Windows 64 bit OS: Location = C:\ProgramData\Bentley\Plant V8i\P&ID

     3. Open the PID-SUP.LSP file in Notepad.

    4. Insert the attached LSP routine just above the “Drawing Initialization” section in the Pid-Sup.lsp file.

    5. Save and Exit.
    5. Re-open P&ID edit the valve's Symbol in Symbol Manager.
    6. Add user_gate to the user function for the Valve wanting Automatic placement of the data. Save.
    7. Place a new control valve.

    ;;;

    (defun MoveOrGetAttributePosstion ( en tag p2 GetPointVal / el p4 p5)

       (setq tag (strcase tag))

       (while (and (setq el (entget (entnext en)))

                   (= (cdr (assoc 0 el)) (strcase "attrib"))

                   (/= (setq p4 (strcase (cdr (assoc 2 el)))) tag)

              )

             (setq en (entnext en))

       )

       (if (and el (= p4 tag))

           (progn

              (setq p4 (cdr (assoc 11 el))

                    p5 (cdr (assoc 10 el))

              )

              (if (not GetPointVal)

                  (progn

                     (setq  el (subst (cons 10 (polar p5 (angle p4 p2)(distance p4 p2)))(assoc 10 el) el)

                            el (subst (cons 11 p2)(assoc 11 el) el)

                            el (entmod el)

                      )

                      (entupd en)

                  )

              )

          )

       )

       p4

    )

     

     

    (defun user_cvalve (link)

       (if (and(setq XdataGot (at_asi_get_xgroup link -18002 ))

               (setq eHand (cdar xdatagot))

               (setq egot (handent eHand))

               (entget egot)

           )

           (progn

              (princ "\nUpdating...")

              ; 0 turn visibility on

              ; 1 turn visibility off

             ; (attvis egot "typ"   0)

              (attvis egot "area"  0)

            ;  (attvis egot "num"   0)

            ;  (attvis egot "sz"    0)

            ;  (attvis egot "ail_mode"  1)

     

              (setq ptM (MoveOrGetAttributePosstion  egot "FAIL_MODE" () T))

     

              ;;Uncomment and adjust for size attribute placement

              (setq ptm (polar ptm 1.57 -.5))

     

              (MoveOrGetAttributePosstion egot "PSZ" ptM ())

     

           )

       )

    )

     

     

    (princ)

     

    • Windows
    • user defined font
    • Annotation
    • Update
    • XM
    • v8i
    • title blocks
    • symbols
    • AutoPLANT P&ID
    • 2D
    • XM edition
    • AutoPlant V8i
    • Autoplant PID
    • V8i SS3
    • TechNotes
    • Share
    • History
    • More
    • Cancel
    • bmoberg Created by Bentley Colleague bmoberg
    • When: Thu, Oct 27 2011 5:48 PM
    • Revisions: 1
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies