agentiskb

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by agentiskb

  1. My company numbers drawings where (ideally) Layout Page 1 shows the number "1" and all subsequent pages show 1.1, 1.2, 1.3. I think this may not be possible.The last option I tried was this: Anyone good at this that sees the error????? TIA # Finds a page-like index by probing the owner chain (works with classes like NVPublisher) def detect_page_index(obj) o = obj 0.upto(6) do break unless o # Try common method names first [:page_number, :page, :sheet_number, :sheet, :index].each do |m| if o.respond_to?(m) begin v = o.send(m) vi = v.is_a?(Integer) ? v : (v.respond_to?(:to_i) ? v.to_i : nil) return vi if vi && vi >= 0 && vi < 1000 rescue end end end # Fallback: scan any method that looks page-ish pageish = o.methods.grep(/page|sheet|index|number/i).reject { |m| m.to_s.end_with?('=') } pageish.each do |m| begin v = o.send(m) vi = v.is_a?(Integer) ? v : (v.respond_to?(:to_i) ? v.to_i : nil) return vi if vi && vi >= 0 && vi < 1000 rescue end end o = o.respond_to?(:owner) ? o.owner : nil end 0 end pn = (defined?(owner) && owner) ? detect_page_index(owner) : 0 # Your mapping: # 0 -> "0" # 1 -> "1" # 2 -> "1.1" # 3 -> "1.2" ... if pn <= 0 "0" elsif pn == 1 "1" # no trailing .0 on page 1 else val = 1.0 + 0.1 * (pn - 1) format('%.1f', val) end
  2. I very clumsily made a door for cabinets using two pyramids and 2 3-d solid face tools with molding. Door looks correct, so I turned it into an Architectural Block. When I added it as a cabinet door to my library, it refuses to be added facing the correct direction. First, what might I have done wrong, and can manipulate the way it faces and resave it?
  3. Can anyone tell me if they have experienced making a CAD object that is curved? I made a curved French country style hood and have the 3D object made, but now my whole system which is normally super fast can't deal with it. Never had a problem making these objects before, but a curved object is new. Now I can move this project along because of the devastatingly long lag. I'm losing it. Help