- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to automate a frame counter.
Frames that are negative are spaced differently than frames that are positive.
So in my example below, all negative frames are 24" on center, all positive frames are 7yrds (21ft) on center.
When I place a part, the Coordinate X gives a distance (CMF_COORD_X), I want iLogic to update my user parameter (X_BOM) to the correct Frame Number. (Decimals are okay)
Once I get this working, I would like to be able to change the 24" and 21ft numbers on the fly to match different projects.
Please let me know where I am messing up. Thank you in advance.
Kenny
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 7672 StartFragment: 314 EndFragment: 7640 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet
'***** Start iLogic Rule "Convert X_Coord to Frame Spacing" ***** 'First 25 frames are on 24" spacing on center and at negative X distances SharedVariable ("Spacing") = 2 ft 'First 25 frames SharedVariable ("First_Frames") = 25 'All other frames are 3 yards apart SharedVariable ("Frames") = 21 ft 'All frames past the first 25 must add 50 ft SharedVariable ("Plus_First") = 50 ft 'Give error message if Parameter is missing Parameter.Quiet = False If CMF_COORD_X > 0 Parameter("X_BOM") = ("CMF_COORD_X"/2) '"2" to be replaced with "Spacing" Else Parameter("X_BOM") = ("CMF_COORD_X"/21)+Plus_First '"21" to be replaced with "Frames" End If '***** End iLogic Rule *****
Solved! Go to Solution.