|
本帖最后由 fuguangyi 于 2022-5-7 14:35 编辑
1、afx零件库里每个文件夹里需要写入如下3类6个文件:
param_relations.txt:
/*这个是给零件写关系式的控制文件
NAMING = BUW_NAME
DESIGNATION = BUW_TYPE + " " + BUW_SIZE
PART_DESC = BUW_NAME
MATERIAL = BUW_TYPE + " " + BUW_SIZE
CNAME= BUW_NAME + " "+ BUW_SIZE
CINDEX = rel_model_name
CMASS = PRO_MP_MASS
cmat = material_param("cmaterial")
oritext = "_"
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp+"." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "."+ extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
Endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "."+ extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
Endif
param_relations_asm.txt:
/*给组价关系式的控制文件
CINDEX = rel_model_name
CMASS = PRO_MP_MASS
cname= ptc_common_name
PROJECT_SHORT = rel_model_name
PROFILE_NUMBER=0
SUBASM_NUMBER=0
oritext = "_"
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp+"." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "."+ extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX=tmp + "." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
Endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "."+ extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
endif
if search(CINDEX,oritext)>1
tmp = extract(CINDEX,1,search(CINDEX,oritext)-1)
CINDEX = tmp + "." + extract(CINDEX,search(CINDEX,oritext)+1,String_length(CINDEX)-search(CINDEX,oritext))
Endif
element_name.txt:
/*给零件写自动文件名的控制文件
SUBASSEMBLY_NAME#-#ELEMENT_NUMBER
element_name_asm.txt:
/*给组件写自动文件夹名的控制文件
PROJECT_SHORT#_#ELEMENT_NUMBER
drawing_setup.txt:
/*给零件写自动控制批量工程图加图框的控制文件
DRAWING_FORMAT_NAME gb_a4
GENERAL_VIEW +XY
TOP_VIEW 1
RIGHT_VIEW 1
BOTTOM_VIEW 1
drawing_setup_asm.txt:
/*给组件写自动控制批量工程图加图框的控制文件
DRAWING_FORMAT_NAME gb_a3_ASM
GENERAL_VIEW +XY
TOP_VIEW 1
RIGHT_VIEW 1
BOTTOM_VIEW 1
|
|