Display full version of the post: Diesel in Dynamic blocks

JimRice
29.12.2009, 22:03
We have some dynamic blocks that have block parameters (Blockheight, Blockwidth, Cut). I trying to get block text to change when the blocks have been stretched to react as shown below. I think I need to use Diesel to do this.
 
If BlockParameter"Cut" = "N" then widthtext = BlockWidth -.006

If BlockParameter"Cut" = "L" then widthtext = BlockWidth -.003

If BlockParameter"Cut" = "R" then widthtext = BlockWidth -.003
 
When I enter $(%<\AcObjProp.16.2 Object(?BlockRefId).Parameter(2).UpdatedDistance \f "%lu2%pr2">%) in the diesel expression I get $(58.25)?? back when all I want is 58.25. How do I get rid of the $( and the )??. Also, do Diesel expressions update when the blocks stretch. My BlockPlaceholder number do update but my Diesel expressions don't.

CarlB
29.12.2009, 22:53
Just a guess,  FWIW-
Maybe delete the $() from the field expression, leaving
%<\AcObjProp.16.2 Object(?BlockRefId).Parameter(2).UpdatedDistance \f "%lu2%pr2">%
 
I found an example field wheen diesel was imbedded in the field, the diesel expression was preceded by "\AcDiesel".
This link may help:
http://mfgcommunity.autodesk.com/blogs/blog/view/7/diesel_fields_title_block/
 

JimRice
29.12.2009, 23:28
I've tried that and it gives me an error "Invalid Field Code". I believe (not sure because I'm new to Diesel) that the $( lets it know that it's a Diesel expression.
 


Thanks for the reply though, I need all the help I can get.