Allplan VisulScript/Python

P.P강좌

PythonPart 기본 코드

홍사훈     0건     494회

첨부파일

본문

Example01.pyp 

(파일 경로에 대소문자 주의!)

<?xml version="1.0" encoding="utf-8"?>

<Element>

    <Script>

        <Name>Example\Example01.py</Name>

        <Title>Example 01</Title>

        <Version>1.0</Version>

    </Script>

    <Page>

        <Name>Page1</Name>

        <Text>Page1</Text>

    </Page>

</Element>

 

Example01.py

def check_allplan_version(build_ele, version):

    """

    Check the current Allplan version

 

    Args:

        build_ele : the building element.

        version: the current Allplan version

 

    Returns:

        True/False if version is supported by this script

    """

 

    # Delete unused arguments

    del build_ele

    del version

 

    # Support all versions

    return True

 

def create_element(build_ele, doc):

    """

    Creation of element

 

    Args:

        build_ele: the building element.

        doc:      input document

    """

    pass

등록된 댓글이 없습니다.



Copyrightⓡ1996~2025, sahoon.com All Rights Reserved.