-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
753 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<script type="text/javascript" src="C:\Temp\AJA\Autodesk.AutoCAD.js"></script> | ||
<title>Sample App</title> | ||
<link rel="stylesheet" | ||
href="https://fonts.googleapis.com/css?family=Open+Sans:light"> | ||
<link rel="stylesheet" href="acadStyle.css"> | ||
<script> | ||
console.clear(); | ||
console.log(Acad.Editor); | ||
function callback() { Acad.Editor.executeCommand("_zoom", "e", " ") }; | ||
let run = function () { | ||
Acad.Editor.addCommand("JSCOMMAND", "customcommand", "customcommand", Acad.CommandFlag.TRANSPARENT, callback); | ||
} | ||
|
||
</script> | ||
</head> | ||
|
||
<body> | ||
|
||
|
||
<div class="grid-container"> | ||
|
||
<div class="item1"> | ||
<div class="clsHeader">Custom Command</div> | ||
</div> | ||
|
||
<div class="item2"> | ||
<div class="clsMain"> | ||
<label class="">something</label> | ||
<p> | ||
|
||
</p> | ||
<label class="acadBtn">something else</label> | ||
<p> | ||
|
||
</p> | ||
<button class="acadBtn"> | ||
stuff | ||
</button> | ||
<input type='button' onclick='window.location.reload()' value='Reload' style="display:inline" /> | ||
|
||
<input type='button' onclick='run()' value="custom command" /> | ||
<p></p> | ||
<label>Click the button then run the command "customcommand"</label> | ||
<p> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="item3"> | ||
<div class="clsFooter"><a href="https://www.paypal.me/georgeendrulat"><button type="button">Donate</button></a></div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
.acadBtn, | ||
.item1 { | ||
border-style: solid; | ||
border-width: 1px | ||
} | ||
|
||
.item1, | ||
.item2, | ||
.item3 { | ||
display: flex | ||
} | ||
|
||
body, | ||
html, | ||
iframe { | ||
margin: 0; | ||
height: 100%; | ||
font-family: "Open Sans", serif; | ||
width: 100%; | ||
} | ||
|
||
.clsHeader { | ||
margin: auto | ||
} | ||
|
||
.acadBtn { | ||
background: #787878; | ||
background: -moz-linear-gradient(top, #787878 0, #545454 100%); | ||
background: -webkit-linear-gradient(top, #787878 0, #545454 100%); | ||
background: linear-gradient(to bottom, #787878 0, #545454 100%); | ||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#787878', endColorstr='#545454', GradientType=0); | ||
padding: 3px; | ||
margin: 3px; | ||
border-color: #323232; | ||
color: #fff | ||
} | ||
|
||
.clsMain { | ||
margin: auto; | ||
background-color: rgba(100, 100, 100, .2); | ||
width: 100%; | ||
} | ||
|
||
.clsFooter { | ||
background-color: rgb(87, 87, 87); | ||
width: 100% | ||
} | ||
|
||
.item1 { | ||
grid-area: header; | ||
background: #535353; | ||
background: -moz-linear-gradient(top, #535353 0, #464646 100%); | ||
background: -webkit-linear-gradient(top, #535353 0, #464646 100%); | ||
background: linear-gradient(to bottom, #535353 0, #464646 100%); | ||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#535353', endColorstr='#464646', GradientType=0); | ||
border-color: #535353 | ||
} | ||
|
||
.item2 { | ||
grid-area: main; | ||
background-color: #5e5e5e; | ||
max-height: 800px; | ||
} | ||
|
||
.item3 { | ||
grid-area: footer; | ||
background-color: rgba(255, 255, 255, 1); | ||
text-align: center | ||
} | ||
|
||
.grid-container { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
right: 0; | ||
display: grid; | ||
grid-template-areas: 'header' 'main' 'footer'; | ||
grid-gap: 1px; | ||
background-color: #3E3E3E; | ||
padding: 1px; | ||
font-size: 14px; | ||
grid-template-columns: 1fr; | ||
grid-template-rows: 0.5fr 4fr 0.5fr; | ||
color: #fff; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<script type="text/javascript" src="C:\Temp\AJA\Autodesk.AutoCAD.js"></script> | ||
<title>Sample App</title> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:light"> | ||
<link rel="stylesheet" href="acadStyle.css"> | ||
<style> | ||
body { | ||
color: #fff; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="grid-container"> | ||
<div class="item1"> | ||
<div class="clsHeader" id="headerText">Pipe Sizes</div> | ||
</div> | ||
<div class="item2"> | ||
<div class="clsMain"> | ||
<iframe id="fragContainer" src="" frameBorder="0"></iframe> | ||
</div> | ||
</div> | ||
<div class="item3"> | ||
<div class="clsFooter"> | ||
<a href="https://www.paypal.me/georgeendrulat"> | ||
<button type="button">Donate</button> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function getURLParameter(name) { | ||
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null; | ||
} | ||
let title = getURLParameter("Title"); | ||
document.getElementById("headerText").innerHTML = title; | ||
let frag = getURLParameter("Frag"); | ||
document.getElementById('fragContainer').src = frag + ".html"; | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Acad.Application.addPalette("Name of palette", "c:/Temp/AJA/capture.html"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Acad.Application.addPalette("Name of palette", "c:/Temp/AJA/CustomCommand.html"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let title = "test"; | ||
let Path = "c:/Temp/AJA/"; | ||
let Fragment = "pipeSizesFrag"; | ||
let templateFile = "app.html?"; | ||
let param1 = "Title="+title; | ||
let param2 = "&Frag=" + Fragment; | ||
|
||
let ConcatURL = (Path + templateFile + param1 + param2); | ||
alert(ConcatURL); | ||
Acad.Application.addPalette(title, ConcatURL); |
Oops, something went wrong.