• Hi everyone,

    I am in the begining level of pml , i need one help from all of u guys i.e, i need to assign one attribute(PTNO 1 PTNT 1 Ptnbarray 1)  to all piping components in design as so, you guys already aware of this it takes too much time to assign these attributes to each and every component in design of my project. So, can anyone provide me a small macro to assign these attributes to all piping components.

    thnx in advance
    Naresh
  • To avoid item codes in my isometric i want the above  attributes should assign to all of my piping components please help me experts...........
  • I would most likely copy the option file.  Edit it to turn off the ITEM CODES and then save it.  But...if you don't have admin rights or cannot save to the option file location, then.....

    What you want is a Do loop.  DO loops are very powerful time saving commands.  You can find info about them here in the PML section.  The basic pml file you would create would be this.  SAVEWORK BEFORE YOU RUN IT!

    Replace the red text with what you would type at the command line.  if you want to run it at world level, remove the for CE portion of the collection.  Save the file and run it!  





    --ATTRIBUTE SET FOR ALL PIPE COMPONENTS
    VAR !Piper coll all BRAN MEM for CE
    DO !x INDEX !PIPER
     $!Piper[$!x]
    [COLOR="red"] ENTER YOUR COMMAND HERE[/COLOR]
    ENDDO
  • i used the above macro  and i followed the guide lines stated by you, but it's navigating to 3rd branch of any pipe and give the following error

    (41,232)  Current element does not have an attribute PTNO.

    In line 4 of Macro c:\temp\MAC_ATT.TXT
    PTNO 1 PTNT 1 Ptnbarray 1



    Regards,
    Naresh Tarani
  • It navigates to the 3rd pipe because the pml stops when it encounters an error with a component that does not have the attribute you want to set.  The third pipe has the component without that attribute

    Add the error handle to your code.

    --ATTRIBUTE SET FOR ALL PIPE COMPONENTS
    VAR !Piper coll all BRAN MEM for CE
    DO !x INDEX !PIPER
    $!Piper[$!x]
    PTNO 1 PTNT 1 Ptnbarray 1
    [COLOR="red"]handle(41,232)
    endhandle[/COLOR]
    ENDDO
  • Thank you very much  DWN06 .....................it's worked....

    Regards,
    Naresh