AutoCAD VB :: Layer Creation Code Not Working In 2013 VBA

May 10, 2012

I have been using a dialog box with checkboxes for creating layers for the past 5 years now with minimal problems.  I don't know much about VBA code, but when there is a problem, I can usually figure out what is going on, which is generally a typo the causes it to error.  The code was created by an employee that left the company about 3 months after I started.

After installing acad 2013 and the VBA enabler this code only partially works.  It will create the layer in the drawings, but will not set the color, linetype or the description.  When I click on the checkbox for any of the layer checkboxes I get a "Run-time error '13':  Type mismatch" error.  I click on the "Debug" button which opens VBA, the "This Drawing.Layers.Add" line in the below code is highlighted.

As a troubleshooting effort, I tried retyping the ".Color" line, when I had typed out "m_refg_pipe_n." a drop-down box appears, but "Color" is not an option anymore.  The only color option in the list is TrueColor, which we do not use.  In the next line of the below code, "Description" is an option.  So I am guessing that the ".Color" line of code is the problem.

Private Sub CheckBox101_Click()
Dim m_refg_pipe_n As AcadLayer
Set m_refg_pipe_n = ThisDrawing.Layers.Add("m-refg-pipe-n")
m_refg_pipe_n.Color = acGreen
m_refg_pipe_n.Linetype = "Hidden"
m_refg_pipe_n.Description = "MN - Refrigerant Piping"
End Sub

View 8 Replies


ADVERTISEMENT

AutoCAD 2013 :: Layer Transparency Not Working In Paperspace

Feb 15, 2013

I have a document in which I have an image in its own layer set to 50% transparency but when I look at the paperspace the transparency isn't transferring.  I do have "Plot transparency" checked under plot options.  

View 4 Replies View Related

AutoCAD Civil 3D :: New Layer Creation

Mar 5, 2012

Some of my co-workers are having issues with layers. They create a new layer, choose a color and rename it and c;ose the ;ayer manager. When they reopen the layer manager, the new layer has reverted back to the color it started with. If they do it a second time, it works properly.

View 3 Replies View Related

AutoCAD Civil 3D :: Automatic Layer Creation

Jan 2, 2014

I am trying to get civil 3D to automatically create layers similar to ones already created. For example-

Using Description keys I am inserting survey points which automatically create layers for each type of point. e.g. p_building. I would also like a second layer to be created called l_building (for building lines) when the p_building layer is created. 

I realize I can create the layers and save as the drawing template but this is not a neat solution as you have to add every possible line layer (l_??) and then you will have a lot of empty layers as not all points are collected on each job.

View 9 Replies View Related

AutoCAD Civil 3D :: Set Alignment Creation Defaults (layer And Options)

Nov 22, 2013

I have quite a few alignments to create and would rather not have to set the layer and conversion options for each. I'd like all to be on the same layer (that is already defined in the drawing) and to change the conversion options both off. I've been looking through the settings table in TS, but haven't found anywhere to change the default layer and conversion option states. Currently, the create alignment from objects defaults are to have alignments on independent layers (Model-Alignment*, where * adds the alignment name as a suffix to the layer name) and both conversion options are on.

View 6 Replies View Related

AutoCAD 2013 :: Viewport Creation In Ribbon

Feb 1, 2013

I can't find the viewport panel that was in 2010 in 2013. I have a panel for model space viewports but not paperspace.

View 2 Replies View Related

AutoCAD 2013 :: SaveAs And Block Creation

Jul 21, 2012

I have a student that downloaded and installed the 2013 student version of AutoCAD.  She then opened a drawing we were working on in class (2012 standard version) and continued to work at home.  She is able to save that drawing by clicking the save button on the Quick Access toolbar, however she is unable to "Saveas" that drawing to a different name or different release.  The dialog box resets the file name to a file path on her C drive as soon as you move the mouse.

The same thing happens when she goes to make a block - she can type a block name in the window, but as soon as the mouse moves, the name changes to a block name already in the list.

View 2 Replies View Related

AutoCAD Inventor :: VBA Code Not Working For Workplane In Assembly

Oct 15, 2004

I have assembly file in which I have created a work plane "Work Plane19" . Now I wanted to create a new work plane which will be paralle to workplane "WorkPlane19" & offset by 10.5 mm in same assembly document through VBA subroutine. I have tried with following code but getting error,

Public Sub NewWorkPlaneCreate()
Dim oAssly As AssemblyDocument
Set oAssly = ThisApplication.ActiveDocument

[Code].....

View 6 Replies View Related

AutoCAD 2013 :: Creation Of Layers Script File?

Jul 22, 2013

I am trying to set up 400+ layers for a project I am currently woirking on and the wayI have been told to do this is through a script file.

I have created this but whenever I run it, the description will not show in Autocad 2013 - an extract from the scr file is below and I would love to find a solution or a fix to any error?

'-LAYER
N W-51CD-SEZE------------ C red W-51CD-SEZE------------ LT continuous W-51CD-SEZE------------ D DRAINAGE - EXISTING GRAVITY PIPE (PLAN/PROFILE/MODEL)

View 5 Replies View Related

AutoCAD 2013 :: Turn Off Automatic Creation Of Log Files?

Sep 26, 2012

how to turn off the automatic creation of log files in my drawing folder?

I have unchecked the <Options> <Open and Save> <Maintain a log file> but they just keep on appearing and manually cleaning them out is a real pain...

View 2 Replies View Related

AutoCAD 2013 :: Template Creation (Title Block)

Dec 18, 2012

Is it possible to create a title block in AutoCAD 2013 and have the option to select from a drop down list a Name and Address to place in a certain area of the title block? 

View 2 Replies View Related

Photoshop :: Droplet Creation Not Working In CS5 And Lion?

Jun 10, 2012

Trying to make a droplet but PS CS5 seems to think it is a PPC item. I am on an intel laptop Macbook Pro. The action works fine on it's own but PS not allowing the droplet. I've been troubleshooting it and there is nothing in it that should disallow- gave an error message about PPC action.
 
I do have some older version of PS on here- (CS3) . Wonder if some sort of directory structure needs fixing since didn't do clean install of Lion.confirm if this is default location: HD/App/Adobe Photoshop CS5/Presets/Actions.

View 1 Replies View Related

AutoCAD 2013 :: Coned Shaped Object - 2D Surface Creation

May 31, 2012

I have a coned shaped object. I want to open it in a 2d flat plane. Is this possible in acad 2013 ?

View 5 Replies View Related

AutoCAD Inventor :: 2013 Crashes During Break Out View Creation?

Aug 7, 2012

I just installed Inventor 2013 (First Mistake) and when I attempt to creat a breakout view, Inventor crashes. The folks at Autodesk are blaming this on my machine running multiple threads. Aren't all modern computers supposed to be running multiple threads?

Inventor 2013
Windows 7 Professional 64-bit SP1
HP EliteBook 8470w
Processor: Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
Memory: 16 GB
AMD FirePro M2000
3D Connexion SpacePilot

View 4 Replies View Related

AutoCAD Civil 3D :: Profile Creation Error After Updating To 2013-SP2

Sep 13, 2013

The company I work for recently updated a few of our computers with the SP2 for Civil 3D 2013.  After this update, every time I create a surface profile, things get all messed up.  Like I have done dozens of times before, I create the profile then open the profile creation tools.  I am using the draw tangents with curves tool and as soon as I click my first tangent point, it shows up about an inch over to the left.  I have struggled through and used the grips to edit after the fact but this used to be a VERY easy task. FYI my snap isn't on or anything goofy like that and when opened on a computer without the service pack, it works as it should. 

View 7 Replies View Related

AutoCAD Inventor :: ILogic Code Not Working For Presentation Files In Drawing

Jun 2, 2013

I have found some code which extracts the part number from the iproperties of a model and adds it to the custom iproperties of a drawing but this will only work on iam or ipt files.

Here's the code, I added the lines referring to the docment type as an attempt to fix the error but it didn't work...
 
If (ThisDrawing.ModelDocument Is Nothing) Then ReturnIf ThisDrawing.ModelDocument.DocumentType = kPresentationDocumentObject Then modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)End IfIf

[Code]....

View 2 Replies View Related

AutoCAD Civil 3D :: Hatch Creation Ribbon Contextual Tab Causes 2013 To Hang?

Dec 16, 2012

When I try to access a hatch pattern from the Hatch Creation Ribbon Contextual Tab, C3D stops working and I have to force the program to quit.  I've tried repairing the installation, which didn't work.  I've also compeltely uninstalled and then reinstllaed the program, and have applied the Service Pack 1 update, but the problem persists.

However, accessing a hatch pattern after using the "Hatch" command from the command does seem to work.

View 4 Replies View Related

AutoCAD 2013 :: Where Does DXF Code 440 Come From

Sep 20, 2013

Our app crashes with a certain dwg-file from a customer.I located the crash to an entity that contains a dxf-code 440.

The error is of course ours, we should be able to handle unknown dxf-codes.But where does it come from? It seems to represent the alpha-channel.

How can I create an entity that contains that dxf-code?And what does a polyline do with an alpha channel?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Checking For Existence Of Drive Using Code Not Working?

May 2, 2013

I'm trying to check for the existence of a drive using lisp, then if not found perform a task (represented in my below example by the alert)

(if (vl-file-directory-p "C: en") T)(alert "exists"))

 I know it doesn't work because if I change the T to nil as demonstrated bellow I should invoke the opposite reaction from autocad but instead I get the exact same outcome which is an alert telling me the file exists?
 
(if (vl-file-directory-p "C: en") nil)(alert "exists"))

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Error / Bad Argument Type - Code Still Working

Jul 23, 2013

My code returns the error, but it still works.

    (vl-load-com)
    (setvar "cmdecho" 0)
    (vlax-for ucs (vla-get-UserCoordinateSystems (vla-get-Activedocument (vlax-get-acad-object)))
    (setq UCSList (cons (vla-get-Name ucs) UCSList)))
    (setq FileName (vl-Filename-Base (getvar "Dwgname")))
    (setq NewUCSList (vl-remove-if '(lambda (x) (vl-string-search FileName x)) UCSList))
    (setq Listlength (length NewUCSList))

[code]....

View 4 Replies View Related

AutoCAD 2013 :: Apply Layer Filter To Layer Toolbar Disables Function Of Layer Filters In Tool Palette

Aug 1, 2012

It appears that the Layer Filters functionality is broken again with 2013. Unchecking the "Apply layer filter to layer toolbar" disables the function of layer filters in the tool palette.

View 5 Replies View Related

AutoCAD VB :: VBA Code Keep On Crushing In 2013

Sep 16, 2013

I have this vba code that created in 2009 autocad 32 bit environment. I am fixing it so  it will work for the 2013 autocad civil 3D 2013 64 bit environment.

The code work fine in the old vision but keep on crushing in the new one . I fixed the references and also move up the search path to the top, but it showing compile errors or runtime errors like the following.

 if you ignore that error and run it agin it will go to the next step and show you another errors. after a few rerun it will give the result.I try fix it with an older vision library of autocad 2009 and 2012 both gives an run time error message.

View 4 Replies View Related

VideoStudio :: Multi-Layer Music Creation

Nov 18, 2013

I can compose my own multi track music, but how to I get it into a format that Corel Video Studio could use -- to allow me to use Set Mood to adjust the layers?

View 5 Replies View Related

AutoCAD 2010 :: VBA Code Won't Work On 2013 X64 System

Jul 19, 2013

I am upgrading the AutoCAD 2009 X 32 systems to the 2013 X64, and I have this vab code that won't work on the new system. I try to move the search path that contain the file up to the top and also got all the missing libraries, but the code still won't work.When I run the code it will give me error message like: compile error:

Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic. The code work perfectly without any error on the old system so I sure the code is causing this error.

View 7 Replies View Related

AutoCAD 2013 :: Enter G Code To End With Result Of 2D Drawing

Apr 4, 2013

Is there any possible way to enter a G Code into AutoCAD to end with the result of a 2D drawing of what my CNC has made? I have the code from the machine, and am not sure how to input it into the program to draw the face the CNC has cut out.

View 9 Replies View Related

AutoCAD Inventor :: 2012 - ILogic Code To Change Drawing Layer Color

Aug 27, 2011

How to change the color of layer that will be used within a drawing files for special purposes.

Ideally the code will make the color Red, but change to Black prior to printing.

The "logic" behind the code currently is to differentiate a layer called "Burn" to a highly visible color for the purpose of review by others then, prior to printing, change the color to Black.  The firm I'm currently working for uses gray-scale B sided printers only.  The firm currently uses Blue for dimension and extension lines so to produce drawings that portray both type of objects "lightly".

View 2 Replies View Related

AutoCAD Inventor :: Change VB Code To Open 2013 Instead Of 2012?

May 14, 2012

I am copying chunks of code from the My First Plugin tutorial and am using the code that opens Inventor to start the form.  I have both Inventor 2012 and 2013 installed on my system.  I have gone in to the properties and changed the .dll reference file to read out of the bin/PublicAssemblies folder in 2013, however, when I run my Windows Form, it will open Inventor 2012 instead. 

View 2 Replies View Related

AutoCAD 2013 :: Adding A Button To A Tool Bar That Triggers A VB Code

Aug 13, 2012

I have a couple of VB pieces of code that set up the standards of my company. What I want to do create a button in my Workspace -within a tab created by me with the CUI tools- and trigger my VB code. 

How is possible to create this button?

View 1 Replies View Related

AutoCAD .NET :: ELockViolation Error Code - Creating New Layer And Make It Work From Push Button

Nov 7, 2011

I wrote some code in VB .NET 2010 getting started from Kean Walmsley project to create a new layer. I did it working directly from code and not using a command line as he did.

[URL] ...

The problem is that the same code works if I call it directly inside the application code, but doesn't if I throw it from a push button.

I get the eLockViolation error code.

View 3 Replies View Related

Photoshop :: Editing Channel Mixer Adjustment Layer Creation Dialogue Settings

Aug 25, 2012

WIndows 7 x64   |   PS CS6. Just now while attempting to edit a Channel Mixer adjustment layer's creation dialogue settings, about 15 browser windows (not tabs but individual windows) trying to load Adobe docs all popped opened simultaneously.Killed Firefox's process and went back to PS.Every time I went back to PS though, it would happen again, when I clicked in the Channel Mixer settings.
 
Got out of the loop by mashing the ESC button as I switched back to PS, which successfully killed the Channel Mixer dialogue.I've seen this behavior in PS for about 4 versions now, but never this severe. How dysfunctional.

View 1 Replies View Related

AutoCAD 2013 :: Error - Undefined Group Code 440 For Object On Line 4974

Apr 10, 2013

When trying to open the dxf file provided by my customer in AutoCAD 2013, it terminates with the error message as

'Undefined group code 440 for object on line 4974 Invalid or incomplete DXF input -- drawing discarded.'

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved