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

Export dxf file through API with colored layers

CAD_CAM_MAN
Advocate

Export dxf file through API with colored layers

CAD_CAM_MAN
Advocate
Advocate

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"
0 Likes
Reply
Accepted solutions (1)
1,957 Views
3 Replies
Replies (3)

mslosar
Advisor
Advisor
Accepted solution

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"
0 Likes

CAD_CAM_MAN
Advocate
Advocate

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!!!

0 Likes

mslosar
Advisor
Advisor

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.

0 Likes