Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
CAD_CAM_MAN
1956 Views, 3 Replies

Export dxf file through API with colored layers

I am trying to export dxf files through the API with the FeatureProfilesLayer color set to yellow but cannot seem to get the syntax correct or maybe missing something else. In any case it is not working. Can somebody show the correct format or point me in the right direction? Code below...

 

sOut = "FLAT PATTERN DXF?AcadVersion=R12&" &
               "OuterProfileLayer=CUT&" &
               "InteriorProfilesLayer=CUT&" &
               "FeatureProfilesLayer=ETCH&" &
               "FeatureProfilesLayerColor=255;255;0" &
               "InvisibleLayers=IV_ARC_CENTERS;IV_TOOL_CENTER;IV_TOOL_CENTER_DOWN;IV_UNCONSUMED_SKETCHES"
Tags (3)
mslosar
in reply to: CAD_CAM_MAN

I set a color for our ETCH layer and a few other things with mine:

 

 Dim sOut As String
        sOut = "FLAT PATTERN DXF?AcadVersion=2010&" &
                            "OuterProfileLayer=0&" &
                            "InteriorProfilesLayer=0&" &
                            "BendUpLayerColor=255;255;0&" &
                            "BendUpLayerLineType=37641&" &
                            "BendDownLayerColor=255;255;0" &
                            "BendDownLayerLineType=37641&" &
                            "BendUpLayer=Etch&" &
                            "BendDownLayer=Etch&" &
                            "BendLayer=Etch&" &
                            "FeatureProfilesUpLayer=Etch&" &
                            "FeatureProfilesUpLayerColor=255;255;0&" &
                            "FeatureProfilesUpLayerLineType=37641&" &
                            "FeatureProfilesDownLayer=Etch&" &
                            "FeatureProfilesDownLayerColor=255;255;0&" &
                            "FeatureProfilesDownLayerLineType=37641&" &
                            "UnconsumedSketchesLayer=Etch&" &
                            "UnconsumedSketchesLayerColor=255;255;0&" &
                            "UnconsumedSketchesLayerLineType=37641&" &
                            "InvisibleLayers=IV_ARC_CENTERS;IV_TANGENT" &
                            "SimplifySplines=False"
CAD_CAM_MAN
in reply to: mslosar

I was missing an ampersand within the quotes on this line... "FeatureProfilesLayerColor=255;255;0" &

 

And needed to add "FeatureProfilesUpLayerColor=255;255;0&" & "FeatureProfilesDownLayerColor=255;255;0&" &

 

Thank you very much for your post!!!

mslosar
in reply to: CAD_CAM_MAN

No problem. 

Saw your post and remembered doing this, having the same problem, and think the answer was kinda dumb :slightly_smiling_face: Glad i knew where it was.