Author Topic: Getting started with ARX/BRX  (Read 2520 times)

0 Members and 1 Guest are viewing this topic.

hmspe

  • Bull Frog
  • Posts: 324
Getting started with ARX/BRX
« on: February 07, 2016, 01:23:55 pm »
Is there a tutorial on how to set up Visual Studio 2013 for ARX/BRX?  I'm trying to compile the samples that come with the Bricscad V16 but I obviously do not have VS configured properly.  The SDK notes say, "To setup a project with Visual studio:  Create a class library using the class library wizard under your preferred .NET language.  There are currently two DLLs that need to be referenced, BrxMgd.DLL and TD_Mgd.DLL. ..."  I've tried Google search and looked at several videos on Youtube but everything I've looked at is for much older versions of VS or is not applicable.

This should be simple and I'm probably over-thinking it.

Thanks for any help or suggestions.
"Science is the belief in the ignorance of experts." - Richard Feynman

MickD

  • Gator
  • Posts: 2883
  • I don't need a job, I need Money!!
Re: Getting started with ARX/BRX
« Reply #1 on: February 07, 2016, 02:21:24 pm »
It's been a while since I have built an ARX plugin but Autodesk may still have an ObjectARX Wizard plugin for VS that will help you get started and has some tools to add commands and some basic scaffolding for other tasks.
It's not a bad idea to learn how to do this without the wizard too as I don't think there is a wizard for BRX (although you may be able to tweak the source of an ARX project once it's created??).

The text you quote looks like it's for a .Net plugin, is your goal to write a C++ .Net plugin or do you want to use C#?
Unless you want to create custom objects or write some managed wrappers of a third party C/C++ library for use in .net there's no real need for C++ really. C#/VB.net/F# would suffice for most tasks and is a lot easier to work with and performance is fine.

Daniel (nullPtr) will have a simple BRX sample and there are some samples in both the BRX and ARX SDK's to review.

There is also some old posts here on the swamp with plenty of comments about what is going on and well worth a search.
"A language that doesn’t have everything is actually easier to program in than some that do."

        — Dennis M. Ritchie

MickD

  • Gator
  • Posts: 2883
  • I don't need a job, I need Money!!
Re: Getting started with ARX/BRX
« Reply #2 on: February 07, 2016, 02:35:46 pm »
Here's a good overview tutorial to get you started. I don't know how up to date it is these days but it should be a good primer to get an idea on how to get going.

http://arxdummies.blogspot.com.au/p/blog-page.html
"A language that doesn’t have everything is actually easier to program in than some that do."

        — Dennis M. Ritchie

hmspe

  • Bull Frog
  • Posts: 324
Re: Getting started with ARX/BRX
« Reply #3 on: February 07, 2016, 06:37:01 pm »
Thanks.  Daniel was kind enough to rebuild Hotkeys for Bricscad V16, but I found that the way that the output from Hotkeys gets passed does not work with a GRREAD loop.  What I'm working on is a keyboard hook that will convert the arrow keys and other non-alpha/numeric keys into two character codes like '@L' for the left arrow key and '@@' for the @ key.  These are used in an on-screen editor for text in LISP that shows cursor position and supports home, end, copy, paste, etc.  I use an AutoHotKey script for the conversions now.  Since I only need about a dozen keys converted I plan to hard code rather than use an external file to store the conversions.  I understand enough C# (and maybe C++) to the edit the Hotkeys source to make it work the way I want but I have to be able to build the project first.  I'd like to get things to a point where I can rebuild when a newer SDK comes out instead of having to ask 
"Science is the belief in the ignorance of experts." - Richard Feynman

MickD

  • Gator
  • Posts: 2883
  • I don't need a job, I need Money!!
Re: Getting started with ARX/BRX
« Reply #4 on: February 07, 2016, 06:47:08 pm »
.... Since I only need about a dozen keys converted I plan to hard code rather than use an external file to store the conversions.

Not a good idea IMO, it is far better to use a config file rather than hard code variables into the source, it's just good practice to do things this way. If you need to alter the source to accommodate a different scenario/configuration then just change the code to deal with the different config.
Once you make the changes it would be good to share those with other users which brings me to your next point -

I'd like to get things to a point where I can rebuild when a newer SDK comes out instead of having to ask

Maybe it's time to put HotKeys on Github or other git repo site, maybe a repo at The Swamp? Yes, you will still need to download and build but the solution should be set up ready to go or perhaps the binaries can be stored there as well.
"A language that doesn’t have everything is actually easier to program in than some that do."

        — Dennis M. Ritchie

nullptr

  • BricsCAD
  • Needs a day job
  • Posts: 6723
  • AKA Daniel
Re: Getting started with ARX/BRX
« Reply #5 on: February 08, 2016, 12:05:45 am »
Hi, Yeah, you need the specific SDK and corresponding Visual Studio & compiler for the target.  BRX changes every year, ARX, about every 2-3 .

For the BRX SDK, you’ll need to send a support request for the SDK. Use the ARX wizard to create new project, or copy the BRX sample.

The latest Hotkeys for BricsCAD build I posted, contains the current project and source, if you have visual 2013, all you need is the SDK and a system variable for the paths..
FYI, I rename some BRX  SDK folders, example inc32 to inc-win32, to match ARX, so I can use variables like

$(BRX16)\inc;$(BRX16)\inc-$(PlatformName; …

BRX16 is a windows system variable I added that points to the SDK, I.e. E:\Dev\ArxSdk\BRXSDK16

Anyway, if you get stuck, this is the place to ask  :-)

nullptr

  • BricsCAD
  • Needs a day job
  • Posts: 6723
  • AKA Daniel
Re: Getting started with ARX/BRX
« Reply #6 on: February 08, 2016, 12:07:08 am »
...
Maybe it's time to put HotKeys on Github or other git repo site, maybe a repo at The Swamp? Yes, you will still need to download and build but the solution should be set up ready to go or perhaps the binaries can be stored there as well.

great idea, do we still have the swamp SVN?

hmspe

  • Bull Frog
  • Posts: 324
Re: Getting started with ARX/BRX
« Reply #7 on: April 27, 2016, 10:56:24 am »
I had a few minutes to work on this again and I'm getting 103 warnings when trying to build from the source for Bricscad v16.  All warnings are similar to the following.  Any help on what to do to fix this would be appreciated.

Warning   1   The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'ManagedAssembly' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutoGenerateBindingRedirects, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, UseDebugLibraries, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRule....   C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets   32   6   Miscellaneous Files
"Science is the belief in the ignorance of experts." - Richard Feynman

nullptr

  • BricsCAD
  • Needs a day job
  • Posts: 6723
  • AKA Daniel
Re: Getting started with ARX/BRX
« Reply #8 on: April 29, 2016, 10:26:46 am »
Hi,

make sure your not using the express version, you'll want the Visual Studio Community 2013

hmspe

  • Bull Frog
  • Posts: 324
Re: Getting started with ARX/BRX
« Reply #9 on: May 01, 2016, 01:41:22 am »
Thanks.  I am in fact using Visual Studio Community 2013.  I probably have something set incorrectly, but I have no idea what.  Fresh install with defaults.  I have added the links for VS to see the Bricscad SDK.   
"Science is the belief in the ignorance of experts." - Richard Feynman

glester

  • Mosquito
  • Posts: 2
Re: Getting started with ARX/BRX
« Reply #10 on: September 11, 2016, 05:54:00 am »
These are the Autodesk tutorials on youtube. They walk you through everything

https://www.youtube.com/watch?v=B0PG2F-YdVg

glester

  • Mosquito
  • Posts: 2
Re: Getting started with ARX/BRX
« Reply #11 on: September 11, 2016, 05:54:53 am »
Those Obarx ]for dummies are circa 2005 it looked like.