LIEXEC export doesn't work in Draw 2.1?

Hello experts, 

I have a modified my_full_dxf.mac file with defined blocking and layering rules etc, which I run via 

LIEXEC /draft_DWG_li 'R24' ConfigData 'my_full_dxf' OUTPUTFILENAME 'C:\DUMP\myfile.dwg'

In Draw E3D 2 it seems to be entirely ignored: it runs fine; displays no errors; does not list the set of rules as in previous versions and exports a .dwg file with some (default?) settings that don't even correspond the ones set through the E3D GUI. 

If I run it in older versions (aveva 5 and E3D 1.1) the script works as it should. When I run it it displays the list of set rules

Rule 1 : SWITCH USELAYERRULES ON
Rule 2 : SWITCH LAYERDEFAA PIPING|YELLOW,CONTINUOS
Rule 3 : SWITCH PrimitiveThickness 'ON'
etc

and gives expected results in the resulting .dwg file. 

I tried adding the line
   liload /Draft_DXF_LI
before 
    dlicon /my_full_dxf

This doesn't fix the problem in 2, but errors out in older versions. 

Is there a known way to enable this for 2? My precise version id 2.1.0.32[Z21032-8]. I would prefer using scripting to GUI for batch exports and ease of transfer to other users.

Very grateful for any help!

Parents
  • Hi Adrijana, 

    I am in the same situation as you were when you posted this. I am trying to write the macros (.mac) to set the layers and layer rules. I also tried to use the config.xml, but the lineweigts are always a problem somehow "." or "," always disappear. 

    Anyway, trying with a .mac now. But I cannot even pass the very simple step of loading the Macro. I keep on getting the Error "(47,.15) CP: Syntax error" even though I literally copy paste the lines from the examples from the AVEVA help. And or use the syntax you wrote on this post. 

    I'm also new to AVEVA, so I dunno if there should be a starting line in the .mac for making it valid. Could you shed some light in this topic for me?

    Thanks a lot!

  • Your mac doesn't need a starting line; just listing code is fine. 

    What I see here is, the syntax goes: 

    SWITCH LAYERDEFAA PIPING|YELLOW,CONTINUOS

    SWITCH LAYERDEFAA <layer name>|<layer colour>,<line definition>

    By what I see, you are trying to push information about line thickness in place where colour information is required. 

    I suggest creating your custom line style with appropriate line thickness, form etc, and then inserting that into the macro. EG: 

    SWITCH LAYERDEFAA PIPING|YELLOW,MYCUSTOMLINESTYLE

    About line style creation, consult the Draw Admin manual.

  • Hi! 

    I added the following lines at the beginning and it started to work just fine. It does ignore the line thickness, so I will proceed as you recommend. 

    $* $Id: Test2_dxf.mac $
    dlicon /Test2_dxf

    Switch...

    Switch...

    exit
    $P Loadable Image ConfigData 'Test2_dxf' - loaded...
    $* End of Test2_dxf.mac

    I find it confusing, because the AVEVA help indicates you can give a line thickness 

    Thanks a lot for your hekp!

Reply
  • Hi! 

    I added the following lines at the beginning and it started to work just fine. It does ignore the line thickness, so I will proceed as you recommend. 

    $* $Id: Test2_dxf.mac $
    dlicon /Test2_dxf

    Switch...

    Switch...

    exit
    $P Loadable Image ConfigData 'Test2_dxf' - loaded...
    $* End of Test2_dxf.mac

    I find it confusing, because the AVEVA help indicates you can give a line thickness 

    Thanks a lot for your hekp!

Children
  • Yes, you're right, I haven't done this in a while so I forgot about the 
    dlicon /macro_name  line... sorry.
    $* are just comments I think. 

    As for the definition, I had similar problems in the past and using custom styles mostly fixed them. 
    Possibly try inserting all of the information in the order indicated in the manual, even if it's superflous, eg:

    'Piping|0.3mm,GREEN,DASHED' 

    One clunky way of figuring out the rules is setting everything up througjh GUI, turning the aveva off and on, and then studying the resulting xml file. 

    Good luck and cheers!

  • Hi,

    I have done like this but while export using LIEXEC /draft_DWG_li 'R24' ConfigData 'my_full_dxf' OUTPUTFILENAME 'C:\DUMP\myfile.dwg' this command not showing color as defined in full_dxf

    what is wrong?

    $* $Id: full_dxf.mac,v 1.4 2000/11/08 14:35:43 mjt Exp $
    $* Should correspond to UI 'full' configuration (PDMSUI/dflts/dra-dxf-full.pmldat)
    dlicon /full_dxf
    switch USELAYERRULES 'ON'
    switch LAYERDEFAA 'ANCI|0.3MM,MAGENTA'
    switch PrimitiveThickness 'ON'
    switch ViewNumberPrefix 'ON'
    switch LayerZone 'ON'
    switch LayerSite 'ON'
    switch LayerBack 'ON'
    switch LayerOlay 'ON'
    switch LayerNote 'ON'
    switch LayerLaye 'ON'
    switch FontMapping 'ON'
    switch LinetypeMapping 'ON'
    switch ColourMapping 'ON'
    switch IncludeZCoordinates 'OFF'
    switch GraphicsOnlyDXF 'OFF'
    switch EntityAcDbMarkers 'ON'
    switch NestedBlocks 'OFF'
    switch BlockBack 'ON'
    switch BlockOlay 'ON'
    switch BlockSymb 'ON'
    switch BlockFill 'ON'
    switch BlockGraphicFile 'ON'
    switch GroupDims 'ON'
    switch GroupNote 'ON'
    switch GroupVnot 'ON'
    switch GroupFrame 'ON'
    switch GroupGlab 'ON'
    switch GroupSlab 'ON'
    switch GroupBlocks 'OFF'
    switch FontFilePath 'OFF'
    switch IncludeDXFHeaderEntities 'OFF'
    switch HeaderFileName '%PDMSEXE%/draft_dxf_li.dxf'
    switch OutputFileName '%PDMSUSER%/output.dxf'
    switch IgnoreBlockRules 'OFF'
    switch ScaleFactor '1.0'
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'PIPE' ) NEQ 0 ), |PIPE|
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'MECH' ) NEQ 0 ), |EQUIPMENT|
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'STRU' ) NEQ 0 ), |STRUCTURE|
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'CONC' ) NEQ 0 ), |CONCREATE|
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'SUPP' ) NEQ 0 ), |SUPPORT|
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'EIC' ) NEQ 0 ), |ELECTRICAL|
    LAYER ALL ZONE WITH ( MAT ( ATTRIB PURP OF OWN OF ZONE  , 'HVAC' ) NEQ 0 ), |HVAC|
    LAYER all VOLM, 'VolmLayer'
    LAYER all CWAY, 'CWayLayer'
    LAYER all CABLE, 'CablLayer'
    LAYER ALL ANCI, 'ANCILAYER'
    
    exit
    $P Customized LI ConfigData Loaded...