Author Topic: Hide Frame  (Read 4933 times)

0 Members and 1 Guest are viewing this topic.

Fabricio28

  • Swamp Rat
  • Posts: 670
Hide Frame
« on: September 01, 2014, 02:52:07 PM »
Hi guys,

The code bellow insert a block. I'd like to hide the frame of the block. How Can I do that?
I have to explode the block and set hide frame.

Code: [Select]
(defun c:CQ nil
(command "_.layer" "_T" "MARGEM" "_M" "MARGEM" "c" "7" "" ""
     "_.layer" "_T" "MARGEM" "_U" "MARGEM" "_M" "MARGEM" "c" "7" "" "")
(command "LAYER" "S" "MARGEM" "" "insert" "MARGEM" pause "" "" ""))

(command "IMAGEFRAME" "0" "" "")?

didn't work.

Thank in advance

ribarm

  • Gator
  • Posts: 3265
  • Marko Ribar, architect
Re: Hide Frame
« Reply #1 on: September 02, 2014, 12:27:43 AM »
I had a similar problem a while ago with clipped xrefs, but only thing I did was to make smaller xrefs so when replaced frame was gone... IMAGEFRAME solved issue only temporarily in current session as I couldn't find the way to make it set as saved in drawing and I had to send my *.dwgs... My solution without clipping was at the end good and I did get drawing more simplified without clipping complications and for me and for the person that was revising my *.dwgs...

So in the future try to avoid clipping as much as possible - number of blocks or xrefs don't really affect dwg size so much and it's much easier to compose drawing with small but different xrefs/blocks than with only few ones that are clipped and more difficult to modify and edit...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Hide Frame
« Reply #2 on: September 02, 2014, 03:54:20 AM »
I have to explode the block and set hide frame.
If by frame you mean the outer polyline of the block why not put it on a dedicated layer that can be frozen or switched off?

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #3 on: September 02, 2014, 11:45:42 AM »
I have to explode the block and set hide frame.
If by frame you mean the outer polyline of the block why not put it on a dedicated layer that can be frozen or switched off?

Frame is the polyline outer the 2 images inside the block. Yes!

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Hide Frame
« Reply #4 on: September 03, 2014, 03:42:25 AM »
Ah, there are in fact images...
Have you tried regenerating the dwg after changing the imageframe setting?

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #5 on: September 03, 2014, 06:50:05 AM »
Yep my friend,
I have tried that without sucess.

If I set imageframe command after insert the block, work fine.
But inside the code isn't working.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Hide Frame
« Reply #6 on: September 03, 2014, 07:56:43 AM »
How about:
Code: [Select]
(setvar 'imageframe 0)
(command "_.regenall")

tedg

  • Swamp Rat
  • Posts: 811
Re: Hide Frame
« Reply #7 on: September 03, 2014, 12:48:01 PM »
How about:
Code: [Select]
(setvar 'imageframe 0)
(command "_.regenall")
To add to this, I've noticed that changing to imageframe = 0 sometimes doesn't "fix it" even with regenall.
What I've had to do is set it to something else first something like:
Code: [Select]
(setvar 'imageframe 2)
(setvar 'imageframe 0)
(command "_.regenall")
Not sure if anyone has this issue, AutoCAD 2013
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Hide Frame
« Reply #8 on: September 03, 2014, 06:33:58 PM »
How about:
Code: [Select]
(setvar 'imageframe 0)
(command "_.regenall")
To add to this, I've noticed that changing to imageframe = 0 sometimes doesn't "fix it" even with regenall.
What I've had to do is set it to something else first something like:
Code: [Select]
(setvar 'imageframe 2)
(setvar 'imageframe 0)
(command "_.regenall")
Not sure if anyone has this issue, AutoCAD 2013
+1 even through UI
For 2013 might try FRAME
Quote
Changing the setting for FRAME changes the IMAGEFRAME, DWFFRAME, PDFFRAME, DGNFRAME, XCLIPFRAME, POINTCLOUDCLIPFRAME, and WIPEOUTFRAME settings to the same setting as the new FRAME setting.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Hide Frame
« Reply #9 on: September 03, 2014, 07:15:10 PM »
How about:
Code: [Select]
(setvar 'imageframe 0)
(command "_.regenall")
To add to this, I've noticed that changing to imageframe = 0 sometimes doesn't "fix it" even with regenall.
What I've had to do is set it to something else first something like:
Code: [Select]
(setvar 'imageframe 2)
(setvar 'imageframe 0)
(command "_.regenall")
Not sure if anyone has this issue, AutoCAD 2013
There is actually a bug in imageframe, if set to 2 or 0 already, you have to change it to something else, then change it back and you have to do this every time you open the drawing. It actually gets really annoying here, hopefully the next version fixes this bug.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Hide Frame
« Reply #10 on: September 04, 2014, 03:32:24 AM »
BricsCAD doesn't have this issue.
How about:
Code: [Select]
(defun SetvarImageframeFix (int) ; Int can be 0, 1 or 2.
  (setvar 'imageframe (rem (1+ int) 3))
  (setvar 'imageframe int)
)

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #11 on: September 04, 2014, 09:04:28 PM »
Thank you very much guys,

I really appreciate the help. I haven't tested the code yet, but as soon as I test I let you know.

Regards

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #12 on: September 08, 2014, 03:45:16 PM »
Hi guys,
I've added that line in my code.
What's wrong with my code?
My block has 2 attributtes, and give a error.

Thank in advance

Code: [Select]
;COMANDOS PARA A INSERÇÃO DE BLOCOS CROQUI
(defun c:CQ nil
(command "_.layer" "_T" "MARGEM" "_M" "MARGEM" "c" "7" "" ""
     "_.layer" "_T" "MARGEM" "_U" "MARGEM" "_M" "MARGEM" "c" "7" "" "")

(command "LAYER" "S" "MARGEM" "" "insert" "MARGEM" pause "" "" "")
(setvar 'imageframe 2)
(setvar 'imageframe 0)
)

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #13 on: September 10, 2014, 10:40:24 AM »
Guys, How Can I turn the frame off in my code?


tedg

  • Swamp Rat
  • Posts: 811
Re: Hide Frame
« Reply #14 on: September 10, 2014, 12:17:54 PM »
Guys, How Can I turn the frame off in my code?


did you try regenall after your last imageframe setvar?
Code: [Select]
(setvar 'imageframe 0)
(command "_.regenall")


Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #15 on: September 10, 2014, 12:41:35 PM »
Yes Ted,

Code: [Select]
;COMANDOS PARA A INSERÇÃO DE BLOCOS CROQUI
(defun c:CQ ()
(command "_.layer" "_T" "MARGEM" "_M" "MARGEM" "c" "7" "" ""
     "_.layer" "_T" "MARGEM" "_U" "MARGEM" "_M" "MARGEM" "c" "7" "" "")

(command "LAYER" "S" "MARGEM" "" "insert" "MARGEM" pause "" "" "")
(setvar 'imageframe 2)
(setvar 'imageframe 0)
(command "_.regenall")
)

But isn't working

Fabricio28

  • Swamp Rat
  • Posts: 670
Re: Hide Frame
« Reply #16 on: September 12, 2014, 12:45:36 PM »
Accept as solution! :)

I'll open a new threat with the same code. But a different doubt.

Regards