I need to do some calculations and print them out from variables as dimensions or to the report. Never really messed with variables so any help will be appreciated! Thanks ahead of time.
Printing Variables!
Collapse
X
-
What exactly do you want to do and I'll post some code?
for example:
Code:F2_900_DIA =FEAT/CIRCLE,RECT,IN,LEAST_SQR THEO/0,0,1.8,0,0,-1,2.9035 ACTL/-0.0014,0.0008,1.8013,0,0,1,2.9042 MEAS/CIRCLE,8,WORKPLANE HIT/BASIC,0,1.4517,1.8,0,-1,0,-0.0004,1.4527,1.8011 HIT/BASIC,1.0265,1.0265,1.8,-0.7071068,-0.7071068,0,1.0273,1.0261,1.8012 HIT/BASIC,1.4517,0,1.8,-1,0,0,1.4506,0.0006,1.8014 HIT/BASIC,1.0265,-1.0265,1.8,-0.7071068,0.7071068,0,1.0263,-1.0247,1.8015 HIT/BASIC,0,-1.4517,1.8,0,1,0,-0.0009,-1.4513,1.8015 HIT/BASIC,-1.0265,-1.0265,1.8,0.7071068,0.7071068,0,-1.0276,-1.0266,1.8014 HIT/BASIC,-1.4517,0,1.8,1,0,0,-1.4536,-0.0009,1.8012 HIT/BASIC,-1.0265,1.0265,1.8,0.7071068,-0.7071068,0,-1.0284,1.0271,1.8011 ENDMEAS/ ASSIGN/F2900DIA = F2_900_DIA.D COMMENT/REPT,F2900DIA
Code:F2_900_DIA =FEAT/CIRCLE,RECT,IN,LEAST_SQR THEO/0,0,1.8,0,0,-1,2.9035 ACTL/-0.0014,0.0008,1.8013,0,0,1,2.9042 MEAS/CIRCLE,8,WORKPLANE HIT/BASIC,0,1.4517,1.8,0,-1,0,-0.0004,1.4527,1.8011 HIT/BASIC,1.0265,1.0265,1.8,-0.7071068,-0.7071068,0,1.0273,1.0261,1.8012 HIT/BASIC,1.4517,0,1.8,-1,0,0,1.4506,0.0006,1.8014 HIT/BASIC,1.0265,-1.0265,1.8,-0.7071068,0.7071068,0,1.0263,-1.0247,1.8015 HIT/BASIC,0,-1.4517,1.8,0,1,0,-0.0009,-1.4513,1.8015 HIT/BASIC,-1.0265,-1.0265,1.8,0.7071068,0.7071068,0,-1.0276,-1.0266,1.8014 HIT/BASIC,-1.4517,0,1.8,1,0,0,-1.4536,-0.0009,1.8012 HIT/BASIC,-1.0265,1.0265,1.8,0.7071068,-0.7071068,0,-1.0284,1.0271,1.8011 ENDMEAS/ COMMENT/REPT,F2_900_DIA.D
Code:ASSIGN/F2900DIA = F2_900_DIA.D
<internet bumper sticker goes here>
-
I need to take a distance and use that to subtract from 7. Then dimension it somehow. I do not wish to have the COMMENT show in the report. I plan on printing to a text file.I used to be high on life but I built up a tolerance.
Brown & Sharpe Global Advantage
PCDMIS CAD++ v2011mr2
PH10MQ/SP600M
sigpic
Comment
-
Use the "-" operator to subtract the distance in your dimension from 7 then use the file open, and file write commands to write the variable to the text file.
Code:DIM GENERIC_DIMENSION= LOCATION OF POINT GENERIC UNITS=IN ,$ GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH AX MEAS NOMINAL +TOL -TOL DEV OUTTOL X 2.9042 2.9035 0.0050 0.0050 0.0007 0.0000 -----#--- END OF DIMENSION GENERIC_DIMENSION ASSIGN/VARIABLETOWRITE = 7 - GENERIC_DIMENSION.X.MEAS FPTR =FILE/OPEN,C:\Documents and Settings\Administrator\Desktop\ExportedPoints.txt,WRITE V1 =FILE/WRITELINE,FPTR,VARIABLETOWRITE FILE/CLOSE,FPTR
BTW how do you export .prg as a BAS like you said you could do in another post?
CraigLast edited by craiger_ny; 08-09-2006, 03:13 PM.<internet bumper sticker goes here>
Comment
-
the value I need is a plane to plane distance which is subtracted from 7. I need it on the report which I am printing to a RTF file.I used to be high on life but I built up a tolerance.
Brown & Sharpe Global Advantage
PCDMIS CAD++ v2011mr2
PH10MQ/SP600M
sigpic
Comment
-
Here ya go:
DIM D53= 2D DISTANCE FROM POINT B9 TO POINT B8 PAR TO YAXIS, NO_RADIUS UNITS=MM ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
AX MEAS NOMINAL +TOL -TOL DEV MAX MIN OUTTOL
M 12.120 12.120 0.025 0.025 0.000 12.120 12.120 0.000 ----#----
ASSIGN/V1 = D53.MEAS
ASSIGN/V2 = 7-V1
GEN_POINT =GENERIC/POINT,DEPENDENT,RECT,$
NOM/XYZ,0,0,-4,$
MEAS/XYZ,0,0,V2,$
NOM/IJK,0,0,1,$
MEAS/IJK,0,0,1
DIM D54= LOCATION OF POINT GEN_POINT UNITS=MM ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
AX MEAS NOMINAL +TOL -TOL DEV MAX MIN OUTTOL
Z -5.120 -4.000 1.500 1.500 -1.120 -5.120 -5.120 0.000 -#-------
END OF DIMENSION D54sigpic
Originally posted by AndersII've got one from September 2006 (bug ticket) which has finally been fixed in 2013.
Comment
widgetinstance 190 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment