Results 1 to 4 of 4

Thread: Invisible Block

  1. #1
    100 Club wpeacock's Avatar
    Join Date
    2015-09
    Location
    Bunbury, West Australia
    Posts
    161
    Login to Give a bone
    0

    Default Invisible Block

    I'm using the following code to insert a block into a drawing.

    Once the code has finished there appears to be no block.
    Zoom > Extents ....No Block

    However using "bcount" AutoCAD counts the block and returns
    "J102622......1" to the command line.

    How can I make the block visible?

    Regards

    Wayne


    Code:
     Private Sub CommandButton1_Click()
         'create the block
         Dim J102622 As AcadBlock
         Dim J102622Pnt(0 To 2) As Double
         Dim J102622PathName As String 'describe thew path name of the block
         J102622Pnt(0) = 0:    J102622Pnt(1) = 0:    J102622Pnt(2) = 38 'blocks xyz insertion points
         J102622PathName = "C:\Temp\102622xyz.dwg" 'path of block
         
         ' Add the external reference to the block
         Set J102622 = ThisDrawing.Blocks.Add(J102622Pnt, "J102622")
       
         ' Insert the block
         Dim blockRefObj As AcadBlockReference
         Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(J102622Pnt, "J102622", 1#, 1#, 1#, 0)
         blockRefObj.Update
         ZoomAll
     
     End Sub
    Last edited by Mike.Perry; 2005-01-31 at 12:56 AM. Reason: Wayne, sorry for the edit, just corrected the closing "Code" tag ie [/CODE] not [\CODE]

  2. #2
    100 Club
    Join Date
    2000-11
    Location
    Adelaide, South Australia
    Posts
    116
    Login to Give a bone
    0

    Default Re: Invisible Block

    Code:
    Private Sub CommandButton1_Click()
    Dim J102622Pnt(0 To 2) As Double
          Dim J102622PathName As String 'describe thew path name of the block
          J102622Pnt(0) = 0:    J102622Pnt(1) = 0:    J102622Pnt(2) = 38 'blocks xyz insertion points
          J102622PathName = "C:\Temp\102622xyz.dwg" 'path of block
          
          ' Insert the block
          Dim blockRefObj As AcadBlockReference
          Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(J102622Pnt, J102622PathName, 1#, 1#, 1#, 0)
          blockRefObj.Update
          ZoomAll
      
      End Sub
    Last edited by Opie; 2006-07-13 at 04:04 AM. Reason: [code] tags added.

  3. #3
    100 Club wpeacock's Avatar
    Join Date
    2015-09
    Location
    Bunbury, West Australia
    Posts
    161
    Login to Give a bone
    0

    Smile Re: Invisible Block

    Many thanks ntaylor!!!

    I've been scratching my head over this one for weeks...
    If I ever get over to SA it's my shout!

    Thanks

    Wayne

  4. #4
    Member
    Join Date
    2006-03
    Location
    Tampa, Florida
    Posts
    9
    Login to Give a bone
    0

    Default Re: Invisible Block

    Use quick select from properties, then change the visiblity state if it is dynamic. If isn't, erase and re-insert. I have had the same problems with blocks, some one inserts them, then erase, but there is still a reference found. the quick select is the funnel looking button the properties palette

Similar Threads

  1. Replies: 1
    Last Post: 2013-01-28, 01:40 PM
  2. Invisible DWF
    By tiffany.amorgan in forum AutoCAD LT - General
    Replies: 1
    Last Post: 2009-06-09, 01:33 PM
  3. Invisible Block
    By tjhernacki in forum AutoCAD General
    Replies: 4
    Last Post: 2007-07-25, 02:00 PM
  4. How to be invisible?
    By Max Lloyd in forum Revit Architecture - General
    Replies: 12
    Last Post: 2005-01-13, 01:24 PM
  5. Invisible line shouldn't be invisible
    By WolffG in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2003-12-19, 01:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •