Author Topic: Feet and Inches... concatinating and passing into an if then statement.  (Read 5643 times)

0 Members and 1 Guest are viewing this topic.

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
I have been working on creating a BOM with formula based columns that include all items in a view file. This BOM {schedule} automaticaly updates, and includes all new items

I have used an if then else statement to control what is placed in the cell, and 3 other DataSetDefinitions to Concatenate Text, Length, and Style for each outcome outlined in the if then statement.

Here is the problem...

I've concatinated [text][length][style][text]

(FC ) (6'-0") (12 Inch D.I. Pipe) (Guaged)

FC 72 12 INCH DI MECH JOINT-TYTON JOINT CEMENT MORTAR LINED ASPHALT COATED (GUAGED)

However.. the [Length] posts in inches.. even more confusing to the client and contractor is the decimal values 17.937 inches.. they expect 1'-5 15/16"  the only value that drives them more insane is feet in decimal 1.49475 Feet.  They don't care about automated schecules and CAD issues, they just want the length in a term they understand, and think we're idiots if we can't type in the correct format of the length.

So if you have any ideas how to correct this I'd like to know... I have great difficulty understanding where to set, and how to control the formatting of the data in the DataSetDefinitions window in the style manager.. and or schedule editor.

See this file.

http://dl.dropbox.com/u/20790817/testing09.dwg

I also attempted to use Chr() to insert ( " ) ( ' ) and ( - )
See this file
http://dl.dropbox.com/u/20790817/testing07.dwg


Any help you could provide will be greatly appreciated.
I am very  trainable....   (forgive my spelling)

Jeff_M

  • King Gator
  • Posts: 3948
  • C3D user & customizer
I guess this is what you are wanting to see?

Jeff_M

  • King Gator
  • Posts: 3948
  • C3D user & customizer
There were a few things I did to get this...

1. Created a new DataSetDefinition to return the CutLength formatted as feet & inches. I then changed style3 to use this in the output
2. Edited the Property Data "Unit - Distance Feet-Inches" to include a " as the suffix. This was key in getting the table to display the result instead of the formula....this is due, I'm thinking, to VBScript seeing the inch symbol and stopping evaluation of the formula. As soon as I added the suffix it all displayed correctly.

If this doesn't help you figure it out I'll post the modified drawing.

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
This is closer.. I need the fractions of an inch as well

It would help to see the file...  I've been looking online at VB Code to convert decimal inches to feet & inches, but I'm not sure how to implement that in the Dataset definitions

Did you break apart [cutlength] into feet and inches and concatonate?  I would like to see how you did that as I have seen some VB code on the net, but not sure how to utilize DIM in the Formula Property Definition



I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Yes I noticed this befor.. and utilized Chr(34) and it worked in the editor, but when applied to the schedule it busted.
I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
I will admit for this type of pipe this accuracy is probably good enoug.. but when I use this schedule and datasetdefinition  to do flanged pipe... I need to be accurate within 1/16th of an inch.. and If I'm to 16th of an inch on this pipe it's excessive.. but not wrong or confusing to the contractor cutting the pipe....

But the shop creating the flanged spools will make them exactly 1'-3" and then there will be problems in the field.. especially if I have 6 spools and the true required measurment is 1'-2 1/2"  Pipe just doesn't strech or compress nearly enough to handle that. And I can't just ship a handfull of extra gaskets.. So a 1/16th inch accuracy is crucial here.
I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
VB code i was looking at

I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
I would like to post the file anyway to those who may follow the thread in the future... If you can't host it on your Dropbox acount.. sent it and I will post it to mine.
I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
I am trying to do what you suggested above and having little success.. I created a new DataSetDefinition called

Inches2FTnIN

Result = [cutlength]

then I applied that clicked ok and applied the Unit - Distance Feet and Inches, no comma, high precision.

Then I went into the Data Set Definitions and added the (") to the suffex of Feet and inches, No comma, high precision. 

I get forumulas in the schedule.. so I removed the (") from the suffex and still posts formula's.

Am I changing the formatting in the wrong location?
I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Ugggg...

I've separated the Feet, Inches, and fraction into their own Property Set Definition  and When I bring them together in [STYLE3] it seem to work in the formula editor.  That is if I enter in correct data in place of the "sampe"

I used {select case} to determin the fractions

It's still just pumping out CODE...

See attached file
http://dl.dropbox.com/u/20790817/testing11.dwg

Jeff M.. could you look at this and see if you can find where I went wrong...

I avoided using " i the inches instead I opted for (2) " ' " using Chr(39)
I thought that would eliminate the issue..   I may have other issues.

I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Would it be possible to do this all inside of [STYLE3]
instead of breaking feet,inches, and fractions into other DataSetDefinitions?

I initially thougth this would make the process simpler, but I'm getting confused.

It's killing me that it is soo close... I have to be right on the edge of it...
I am very  trainable....   (forgive my spelling)

Jeff_M

  • King Gator
  • Posts: 3948
  • C3D user & customizer
Sorry, I'm on vacation and was driving all day each of the last 2 days. Now in the middle of Nebraska...

Attached is the drawing I used with the modified/added items mentioned before. I did make one change so it goes to 1/16"

Hope it helps.

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Will Look hard at this tomorrow.
I thank you again for your help.  I hope more people will look at this.  Thank you for your assistance.  I can now move on to a new thread. I removed the unused DataSetDefinitions.

End of Thread File
http://dl.dropbox.com/u/20790817/testing13.dwg

Sorry to have interrupted your Vacation.
 :-o
I am very  trainable....   (forgive my spelling)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
I have continued to modify this schedule.  But it would not be where it is without the help of those in the VB Forum.  Thanks Team.

I hope this also helps others.

I am very  trainable....   (forgive my spelling)

Jeff_M

  • King Gator
  • Posts: 3948
  • C3D user & customizer
Glad I could be of some assistance. In so doing it forced me to look at the MEP product, which I've been wanting to do for some time.

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
 :?

 :-D

 :lmao:

 :-)
I am very  trainable....   (forgive my spelling)