Current Scale?

Discussion in 'AutoCAD' started by -Brian-, Jul 11, 2003.

  1. -Brian-

    -Brian- Guest

    Hello,

    I'm inserting a title block into Modelspace through a VBA program and I wanted to know how to fill the attributes with variables that I have set. I have a Module with A sub routine in it that prompts the user to enter job information at the command line. It then stores this information as variables through VBA to be used later in the title block. How can I access the title block attributes and then use my variables to fill in the title block?

    Also, how do I get the current scale in Modelspace. I know how to get the current scale in a Layout.......ex:Dim Layout As ACADLayout Dim currScale As Integer Set Layout = ThisDrawing.ActiveLayout currScale = Layout.StandardScale

    Thanks
     
    -Brian-, Jul 11, 2003
    #1
  2. -Brian-

    -Brian- Guest

    1st I'm not talking about extracting attributes. I know how to that and I know how to work with attributes. This is strictly a VBA question.

    Normally when I insert my title block with attributes, in modelspace, it prompts me with the pre setup prompts. EX: "Enter job name:".....When I insert the title block through VBA it doesn't prompt me with anything, it just inserts the title block. Also, I draw 1:1 but by scale I was refering to Dimscale. I have custom pull down menus which I use to set the dimscale, ltscale, style etc.. all at once with DIESEL commands and lisps routines. It also inserts the title block and automatically scales it to the dimscale because I use Modelspace and not Paperspace, unless I'm drawing in 3D.

    2nd In my original question I asked how I could use my stored variables to fill in the information in the title block. Through VBA I prompt the user for EX: "Enter job name" and then I store this as a variable named JobName. I wanted to know how I could, for example, insert the JobName variable information into the title block.

    I may not have explained myself enough, but thanks for your reply. Anyone else
     
    -Brian-, Jul 11, 2003
    #2
  3. 1st I'm not talking about extracting attributes

    The ExtAttr demo shows you how to get at the attributes in a drawing or
    block. Once you have drilled down to your target block/attribute just force
    your saved variable into the attribute value instead of extracting it. Tweak
    it to run backwards, so to speak, using your own variables.
     
    Gary McMaster, Jul 11, 2003
    #3
  4. -Brian-

    RogueDrafter Guest

    First: Look up getattributes.



     



    Second: Take a serious look at why you would want to use modelspace titleblocks.  If you use a layout tb your scale would never change it would always be 1.  Your plot scale would be controlled through the viewport zoom scale.  That is the way to go.  Using VBA to implement modelspace titleblocks is similar to taking two steps forward and three steps back.



    "-Brian-" <> wrote in message news:...

    Hello,

    I'm inserting a title block into Modelspace through a VBA program and I wanted to know how to fill the attributes with variables that I have set. I have a Module with A sub routine in it that prompts the user to enter job information at the command line. It then stores this information as variables through VBA to be used later in the title block. How can I access the title block attributes and then use my variables to fill in the title block?

    Also, how do I get the current scale in Modelspace. I know how to get the current scale in a Layout.......ex:Dim Layout As ACADLayout Dim currScale As Integer Set Layout = ThisDrawing.ActiveLayout currScale = Layout.StandardScale

    Thanks
     
    RogueDrafter, Jul 11, 2003
    #4
  5. -Brian-

    -Brian- Guest

    When you dimension your drawings, are you using paperspace or modelspace. If you use modelspace and you have several different scaled viewports, then you have to have different dimscales in order to have the appropriate scale in paperspace. If you dimension in paperspace and someone pans the viewport, then you have a mess. I know you can lock the viewport, but it can be unlocked as well. You have to decide which way to go and make some adjustments. Do I draw in modelspace, dimension in paperspace and take the chance of some new drafter messing it up. Do I draw in modelspace, make several different dimscales and dimension everything in modelspace or do I draw in modelspace, dimension in modelspace and plot in modelspace with my automated system. I think in 2004 you can dimension through the viewport to modelspace so that the dimension somehow stays with the object, but I have 2000i.

    I'm actually developing two systems. One based on modelspace and one based on paperspace. The system that's based in modelspace is extremely effective because it's all automated. I just pick the scale and the border and it's done. Everything is to scale including linetypes, dimensions, child dimensions, limits, text, leaders, plot scale, styles are set, everything is set. If I change the scale everything is updated. I'll be working on the paperspace program shortly. Thanks for all the replies!
     
    -Brian-, Jul 14, 2003
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.